From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: flyspell.el and non-word characters in CASECHARS Date: Mon, 16 Apr 2012 22:55:37 +0300 Message-ID: <838vhvsb7q.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1334606261 10703 80.91.229.3 (16 Apr 2012 19:57:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 16 Apr 2012 19:57:41 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 16 21:57:41 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SJs3P-00029X-Mu for ged-emacs-devel@m.gmane.org; Mon, 16 Apr 2012 21:57:39 +0200 Original-Received: from localhost ([::1]:53344 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJs3P-0005MX-5k for ged-emacs-devel@m.gmane.org; Mon, 16 Apr 2012 15:57:39 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJs3L-0005MG-IP for emacs-devel@gnu.org; Mon, 16 Apr 2012 15:57:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SJs3I-0007rW-N0 for emacs-devel@gnu.org; Mon, 16 Apr 2012 15:57:35 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:43962) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJs3I-0007qs-Fu for emacs-devel@gnu.org; Mon, 16 Apr 2012 15:57:32 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M2L000008ORX800@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Mon, 16 Apr 2012 22:57:28 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.229.57.204]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M2L00M1W8RRP0W0@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Mon, 16 Apr 2012 22:57:27 +0300 (IDT) X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.172 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:149701 Archived-At: 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?