[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: flyspell.el and non-word characters in CASECHARS
From: |
Agustin Martin |
Subject: |
Re: flyspell.el and non-word characters in CASECHARS |
Date: |
Wed, 18 Apr 2012 18:26:19 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Tue, Apr 17, 2012 at 08:51:24PM +0300, Eli Zaretskii wrote:
> > 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)
I tested with your changes and they do not seem to help here. I put some
(message "") to check when the casechars test is reached and in a small text
showing this behavior I found no match (not previously matched by word
syntax). I put an otherchars test and also did not help, but at least there
is a proper match in otherchars.
Anyway, adding otherchars test did not help directly but did indirectly.
When testing otherchars I noticed that flyspell.el seems to honour delays
for dashes, but not for otherchars. Words are checked inmediately after
apostrophe, but check is properly delayed for dashes.
I have been playing with enabling delays also for otherchars together with
adding an otherchars test. I think I tried this morning these changes
and had problems with things like
sdasd'ss
and friends, but now they seem to work well. I am a bit confused, I
probably tested something different.
Does attached diff help at your site?
--
Agustin
flyspell.el_use-otherchars.diff
Description: Text Data