all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Agustin Martin <agustin.martin@hispalinux.es>
To: emacs-devel@gnu.org
Subject: Re: flyspell.el and non-word characters in CASECHARS
Date: Tue, 17 Apr 2012 19:26:36 +0200	[thread overview]
Message-ID: <20120417172635.GA26574@agmartin.aq.upm.es> (raw)
In-Reply-To: <838vhvsb7q.fsf@gnu.org>

On Mon, Apr 16, 2012 at 10:55:37PM +0300, Eli Zaretskii wrote:
> In flyspell.el:flyspell-check-pre-word-p we have this snippet:
> 
>    ((or (and (= flyspell-pre-point (- (point) 1))
> 	     (eq (char-syntax (char-after flyspell-pre-point)) ?w))
> 	(= flyspell-pre-point (point))
> 	(= flyspell-pre-point (+ (point) 1)))
>     nil)
>    ((and (symbolp this-command)
> 	 (not executing-kbd-macro)
> 	 (or (get this-command 'flyspell-delayed)
> 	     (and (get this-command 'flyspell-deplacement)
> 		  (eq flyspell-previous-command this-command)))
> 	 (or (= (current-column) 0)
> 	     (= (current-column) flyspell-pre-column)
> 	     ;; If other post-command-hooks change the buffer,
> 	     ;; flyspell-pre-point can lie past eob (bug#468).
> 	     (null (char-after flyspell-pre-point))
> 	     (eq (char-syntax (char-after flyspell-pre-point)) ?w)))
>     nil)
> 
> I think it's wrong to test for word syntax here; we should test for a
> match against CASECHARS, or maybe even CASECHARS and OTHERCHARS.
> These are what defines a "word" in this context, because flyspell must
> be consistent with what the speller does.
> 
> I bumped into this spell-checking Hebrew text with Hunspell: the he_IL
> dictionary considers " and ' be WORDCHARS (they are indeed used as
> part of words of foreign origin and in acronyms), but typing these
> characters under flyspell-mode immediately marks the preceding word as
> a typo, although self-insert-command is in
> flyspell-default-delayed-commands, and so should have triggered a
> 3-sec delay in spell-checking, letting me to continue typing.  If I
> use a match against CASECHARS instead of the word syntax, the problem
> goes away.
> 
> Am I missing something?

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.
Did your test work only with CASECHARS instead of CASECHARS+OTHERCHARS?

For the records, I see the same problem in other languages for valid words
including "otherchars". Since I was recently playing with Catalan I tried
with "intel·ligent", just after typing the middledot "intel" is marked as
typo and only when I finish correctly typing word the mark disappear.

-- 
Agustin



  reply	other threads:[~2012-04-17 17:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-16 19:55 flyspell.el and non-word characters in CASECHARS Eli Zaretskii
2012-04-17 17:26 ` Agustin Martin [this message]
2012-04-17 17:51   ` Eli Zaretskii
2012-04-18 16:26     ` Agustin Martin
2012-04-18 18:45       ` Eli Zaretskii
2012-04-20 15:26         ` Agustin Martin

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120417172635.GA26574@agmartin.aq.upm.es \
    --to=agustin.martin@hispalinux.es \
    --cc=emacs-devel@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.