emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: flyspell.el and non-word characters in CASECHARS


From: Eli Zaretskii
Subject: Re: flyspell.el and non-word characters in CASECHARS
Date: Tue, 17 Apr 2012 20:51:24 +0300

> Date: Tue, 17 Apr 2012 19:26:36 +0200
> From: Agustin Martin <address@hidden>
> 
> The only reason I can think is that at that time there is no way to know if
> that wordchar is going to be in the middle of a word or not. If it appears
> at a word boundary, is not what ispell.el seems to consider a wordchar.

But in that case, the following non-word character (blank or
punctuation) will trigger the spell-check of the word.  So we lose
nothing, right?

> Did your test work only with CASECHARS instead of CASECHARS+OTHERCHARS?

I actually _added_ to the word-syntax test the test against CASECHARS,
like this:

   ((or (and (= flyspell-pre-point (- (point) 1))
             (or (eq (char-syntax (char-after flyspell-pre-point)) ?w)
                 (string-match-p (flyspell-get-casechars)
                                 (buffer-substring-no-properties
                                  flyspell-pre-point (1+ flyspell-pre-point)))))
        (= flyspell-pre-point (point))
        (= flyspell-pre-point (+ (point) 1)))
    nil)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]