Subject: Re: bug#6411: Ispell string or comment

From: Eli Zaretskii <[email-masked]>
Date: Wed, 21 Aug 2019 20:08:29 +0300

> From: Stefan Kangas <[email-masked]>
> Date: Wed, 21 Aug 2019 16:07:53 +0200
> Cc: [email-masked]
> 
> Lennart Borgman <[email-masked]> writes:
> 
> > Here is a suggestion for a function ispell-comment-or-string for spell
> > checking of current comment or string, see attachement.
> 
> This patch from 2010 still applies on current master, and it seems to
> work as advertised from my minimal testing.  I think it would be a
> good addition.  Does anyone object to installing it?

Sorry, but I happen to think the proposed implementation is somewhat
inelegant:

  . what's with the "(interactive (list nil))" part?
  . why not just make ispell-comments-and-strings accept a prefix
    argument to modify its behavior?
  . alternatively, why not make ispell-comments-and-strings be
    sensitive to the active region?
  . as yet another alternative, make the new ispell-comment-or-string
    narrow to the comment/string at point and then call
    ispell-comments-and-strings with no code changes whatsoever; then
    make the new command be sensitive to active region, and fall back
    on the string/comment at point if no active region