emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp/textmodes flyspell.el


From: Kevin Ryde
Subject: [Emacs-diffs] emacs/lisp/textmodes flyspell.el
Date: Mon, 16 Nov 2009 22:52:29 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Kevin Ryde <kryde>      09/11/16 22:52:29

Modified files:
        lisp/textmodes : flyspell.el 

Log message:
        * textmodes/flyspell.el (sgml-mode-flyspell-verify): Use
        `sgml-lexical-context' instead of own parse for tag.  (Further to
        Bug#4511).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/textmodes/flyspell.el?cvsroot=emacs&r1=1.150&r2=1.151

Patches:
Index: flyspell.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/textmodes/flyspell.el,v
retrieving revision 1.150
retrieving revision 1.151
diff -u -b -r1.150 -r1.151
--- flyspell.el 17 Oct 2009 22:43:18 -0000      1.150
+++ flyspell.el 16 Nov 2009 22:52:29 -0000      1.151
@@ -360,13 +360,14 @@
 (put 'nxml-mode 'flyspell-mode-predicate 'sgml-mode-flyspell-verify)
 
 (defun sgml-mode-flyspell-verify ()
-  "Function used for `flyspell-generic-check-word-predicate' in SGML mode."
-  (not (save-excursion
-        (or (looking-at "[^<\n]*>")
-            (ispell-looking-back "<[^>\n]*" (line-beginning-position))
-            (and (looking-at "[^&\n]*;")
-                 (ispell-looking-back "&[^;\n]*"
-                                       (line-beginning-position)))))))
+  "Function used for `flyspell-generic-check-word-predicate' in SGML mode.
+Tag and attribute names are not spell checked, everything else is.
+
+String values of attributes are checked because they can be text
+like <img alt=\"Some thing.\">."
+
+  (not (memq (car (sgml-lexical-context))
+            '(tag pi))))
 
 ;;*---------------------------------------------------------------------*/
 ;;*    Programming mode                                                 */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]