changeset 111549:fa7baa1af30c

flyspell.el (flyspell-generic-progmode-verify): Make sure to check inside the word (Bug#6761).
author Agustin Martin <agustin.martin@hispalinux.es>
date Mon, 15 Nov 2010 13:27:33 +0100
parents ae7e9ce45a16
children 876a7947c90d
files lisp/ChangeLog lisp/textmodes/flyspell.el
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sun Nov 14 22:42:21 2010 -0800
+++ b/lisp/ChangeLog	Mon Nov 15 13:27:33 2010 +0100
@@ -1,3 +1,8 @@
+2010-11-15  Agustín Martín  <agustin.martin@hispalinux.es>
+
+	* textmodes/flyspell.el (flyspell-generic-progmode-verify):
+	Make sure to check inside the word (Bug#6761).
+
 2010-11-14  Chong Yidong  <cyd@stupidchicken.com>
 
 	* startup.el (command-line): If the cursorColor resource is set,
--- a/lisp/textmodes/flyspell.el	Sun Nov 14 22:42:21 2010 -0800
+++ b/lisp/textmodes/flyspell.el	Mon Nov 15 13:27:33 2010 +0100
@@ -380,7 +380,8 @@
 
 (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