diff options
| author | Kevin Ryde | 2009-11-16 22:53:21 +0000 |
|---|---|---|
| committer | Kevin Ryde | 2009-11-16 22:53:21 +0000 |
| commit | e3c39c01f5cf08b0a1f1135c0ac721d142cc8a09 (patch) | |
| tree | 54badefd323569d9e70e3ed9a023c9035a77804f | |
| parent | 8834a98b6bef215589a21a0832b50a11def7de34 (diff) | |
| download | emacs-e3c39c01f5cf08b0a1f1135c0ac721d142cc8a09.tar.gz emacs-e3c39c01f5cf08b0a1f1135c0ac721d142cc8a09.zip | |
* textmodes/flyspell.el (sgml-mode-flyspell-verify): Use
`sgml-lexical-context' instead of own parse for tag. (Further to
Bug#4511).
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/textmodes/flyspell.el | 15 |
2 files changed, 14 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 67a56445aff..cfe1492a962 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2009-11-16 Kevin Ryde <user42@zip.com.au> | ||
| 2 | |||
| 3 | * textmodes/flyspell.el (sgml-mode-flyspell-verify): Use | ||
| 4 | `sgml-lexical-context' instead of own parse for tag. (Further to | ||
| 5 | Bug#4511). | ||
| 6 | |||
| 1 | 2009-11-16 Dan Nicolaescu <dann@ics.uci.edu> | 7 | 2009-11-16 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 8 | ||
| 3 | * vc.el (vc-log-show-limit): Default to 2000. | 9 | * vc.el (vc-log-show-limit): Default to 2000. |
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index bffbbbc3cc1..9aaf466f0ed 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el | |||
| @@ -360,13 +360,14 @@ property of the major mode name.") | |||
| 360 | (put 'nxml-mode 'flyspell-mode-predicate 'sgml-mode-flyspell-verify) | 360 | (put 'nxml-mode 'flyspell-mode-predicate 'sgml-mode-flyspell-verify) |
| 361 | 361 | ||
| 362 | (defun sgml-mode-flyspell-verify () | 362 | (defun sgml-mode-flyspell-verify () |
| 363 | "Function used for `flyspell-generic-check-word-predicate' in SGML mode." | 363 | "Function used for `flyspell-generic-check-word-predicate' in SGML mode. |
| 364 | (not (save-excursion | 364 | Tag and attribute names are not spell checked, everything else is. |
| 365 | (or (looking-at "[^<\n]*>") | 365 | |
| 366 | (ispell-looking-back "<[^>\n]*" (line-beginning-position)) | 366 | String values of attributes are checked because they can be text |
| 367 | (and (looking-at "[^&\n]*;") | 367 | like <img alt=\"Some thing.\">." |
| 368 | (ispell-looking-back "&[^;\n]*" | 368 | |
| 369 | (line-beginning-position))))))) | 369 | (not (memq (car (sgml-lexical-context)) |
| 370 | '(tag pi)))) | ||
| 370 | 371 | ||
| 371 | ;;*---------------------------------------------------------------------*/ | 372 | ;;*---------------------------------------------------------------------*/ |
| 372 | ;;* Programming mode */ | 373 | ;;* Programming mode */ |