From: martin rudalics <rudalics@gmx.at>
To: "Michaël Cadilhac" <michael@cadilhac.name>
Cc: emacs-devel@gnu.org, rms@gnu.org,
Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: flypell and check-comments.
Date: Sun, 11 Mar 2007 15:38:30 +0100 [thread overview]
Message-ID: <45F41466.6010108@gmx.at> (raw)
In-Reply-To: <87slccrl4w.fsf@lrde.org>
> Stefan, Martin, is the code here what you meant (it may not be,
> font-locking is not my cup of tea)?
Maybe the following should be reconsidered
> ! (and (not ispell-check-comments)
> ! (nth 4 (syntax-ppss (car (cdr flyspell-word))))))
since on the one hand you don't check for `ispell-check-comments' being
eq to 'exclusive (hence you don't emulate ispell faithfully - I don't
know whether this is even desirable) while on the other hand you don't
check whether you're in a string (hence you don't fully emulate the
default of `flyspell-prog-text-faces' either). But maybe I'm wrong.
Also `syntax-ppss' may get expensive for `flyspell-large-region'. It's
generally better to use it for the first position only, save position
and parse-state, and then do `parse-partial-sexp' from the last saved
position and parse-state.
By no means I want(ed) to express here that syntax _should_ be parsed.
What I meant was that if a user does not want to use font-lock _and_
wants to spell-check comments or strings specially, parsing syntax is
the only practical way. Hence, IMHO ignoring `ispell-check-comments'
here is a viable alternative as well.
next prev parent reply other threads:[~2007-03-11 14:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-07 14:36 flypell and check-comments Michaël Cadilhac
2007-03-07 18:28 ` martin rudalics
2007-03-07 18:42 ` Michaël Cadilhac
2007-03-07 20:31 ` Stefan Monnier
2007-03-07 21:55 ` martin rudalics
2007-03-11 4:24 ` Richard Stallman
2007-03-11 12:59 ` Michaël Cadilhac
2007-03-11 14:38 ` martin rudalics [this message]
2007-03-11 17:25 ` Michaël Cadilhac
2007-03-11 19:52 ` martin rudalics
2007-03-12 13:01 ` Michaël Cadilhac
2007-03-12 18:59 ` martin rudalics
2007-03-11 21:58 ` Stefan Monnier
2007-03-24 16:55 ` Chong Yidong
2007-03-25 19:48 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45F41466.6010108@gmx.at \
--to=rudalics@gmx.at \
--cc=emacs-devel@gnu.org \
--cc=michael@cadilhac.name \
--cc=monnier@iro.umontreal.ca \
--cc=rms@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).