From: Agustín Martín Date: Mon, 15 Nov 2010 12:27:33 +0000 (+0100) Subject: flyspell.el (flyspell-generic-progmode-verify): Make sure to check inside the word... X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~45^2~235 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=84992dff60e450d1c81283fac2b77294e8ad7755;p=emacs.git flyspell.el (flyspell-generic-progmode-verify): Make sure to check inside the word (Bug#6761). --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 99eca11ee4c..26c814fcc21 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-11-15 Agustín Martín + + * textmodes/flyspell.el (flyspell-generic-progmode-verify): + Make sure to check inside the word (Bug#6761). + 2010-11-14 Chong Yidong * startup.el (command-line): If the cursorColor resource is set, diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index b08b75c728b..5dbcb2d7d77 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -380,7 +380,8 @@ like \"Some." (defun flyspell-generic-progmode-verify () "Used for `flyspell-generic-check-word-predicate' in programming modes." - (let ((f (get-text-property (point) 'face))) + ;; (point) is next char after the word. Must check one char before. + (let ((f (get-text-property (- (point) 1) 'face))) (memq f flyspell-prog-text-faces))) ;;;###autoload