comparison lisp/textmodes/flyspell.el @ 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 4bc29c387217
children 417b1e4d63cd
comparison
equal deleted inserted replaced
111548:ae7e9ce45a16 111549:fa7baa1af30c
378 '(font-lock-string-face font-lock-comment-face font-lock-doc-face) 378 '(font-lock-string-face font-lock-comment-face font-lock-doc-face)
379 "Faces corresponding to text in programming-mode buffers.") 379 "Faces corresponding to text in programming-mode buffers.")
380 380
381 (defun flyspell-generic-progmode-verify () 381 (defun flyspell-generic-progmode-verify ()
382 "Used for `flyspell-generic-check-word-predicate' in programming modes." 382 "Used for `flyspell-generic-check-word-predicate' in programming modes."
383 (let ((f (get-text-property (point) 'face))) 383 ;; (point) is next char after the word. Must check one char before.
384 (let ((f (get-text-property (- (point) 1) 'face)))
384 (memq f flyspell-prog-text-faces))) 385 (memq f flyspell-prog-text-faces)))
385 386
386 ;;;###autoload 387 ;;;###autoload
387 (defun flyspell-prog-mode () 388 (defun flyspell-prog-mode ()
388 "Turn on `flyspell-mode' for comments and strings." 389 "Turn on `flyspell-mode' for comments and strings."