]> code.delx.au - gnu-emacs/commitdiff
(mail-mode-flyspell-verify): Spell-check
authorGerd Moellmann <gerd@gnu.org>
Fri, 29 Dec 2000 15:14:51 +0000 (15:14 +0000)
committerGerd Moellmann <gerd@gnu.org>
Fri, 29 Dec 2000 15:14:51 +0000 (15:14 +0000)
in Subject line.

lisp/textmodes/flyspell.el

index 229dcc1956e9cdf71a4c384430e222e0478e4b9f..897ad4ca3e1c21184608b3c847f31ae19ce62f37 100644 (file)
@@ -229,12 +229,20 @@ property of the major mode name.")
 (put 'message-mode 'flyspell-mode-predicate 'mail-mode-flyspell-verify)
 (defun mail-mode-flyspell-verify ()
   "This function is used for `flyspell-generic-check-word-p' in Mail mode."
-  (save-excursion
-    (not (or (re-search-forward mail-header-separator nil t)
-            (re-search-backward message-signature-separator nil t)
-            (progn
-              (beginning-of-line)
-              (looking-at "[>}|]\\To:"))))))
+  (let ((in-headers (save-excursion
+                     (re-search-forward mail-header-separator nil t)))
+       (in-signature (save-excursion
+                       (re-search-backward message-signature-separator nil t))))
+    (cond (in-headers
+          (save-excursion
+            (beginning-of-line)
+            (looking-at "^Subject:")))
+         (in-signature
+          nil)
+         (t
+          (save-excursion
+            (beginning-of-line)
+            (not (looking-at "[>}|]\\To:")))))))
 
 ;*--- texinfo mode ----------------------------------------------------*/
 (put 'texinfo-mode 'flyspell-mode-predicate 'texinfo-mode-flyspell-verify)