[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: flypell and check-comments.
From: |
martin rudalics |
Subject: |
Re: flypell and check-comments. |
Date: |
Sun, 11 Mar 2007 15:38:30 +0100 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
> 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.
- flypell and check-comments., Michaël Cadilhac, 2007/03/07
- Re: flypell and check-comments., martin rudalics, 2007/03/07
- Re: flypell and check-comments., Michaël Cadilhac, 2007/03/07
- Re: flypell and check-comments., Stefan Monnier, 2007/03/07
- Re: flypell and check-comments., martin rudalics, 2007/03/07
- Re: flypell and check-comments., Richard Stallman, 2007/03/10
- Re: flypell and check-comments., Michaël Cadilhac, 2007/03/11
- Re: flypell and check-comments.,
martin rudalics <=
- Re: flypell and check-comments., Michaël Cadilhac, 2007/03/11
- Re: flypell and check-comments., martin rudalics, 2007/03/11
- Re: flypell and check-comments., Michaël Cadilhac, 2007/03/12
- Re: flypell and check-comments., martin rudalics, 2007/03/12
- Re: flypell and check-comments., Stefan Monnier, 2007/03/11
- Re: flypell and check-comments., Chong Yidong, 2007/03/24
- Re: flypell and check-comments., Stefan Monnier, 2007/03/25