From: Gerd Moellmann Date: Fri, 29 Dec 2000 15:14:51 +0000 (+0000) Subject: (mail-mode-flyspell-verify): Spell-check X-Git-Tag: emacs-pretest-21.0.95~232 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=53287eb034af729bf61f579892fbd21b382de445;p=emacs.git (mail-mode-flyspell-verify): Spell-check in Subject line. --- diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 229dcc1956e..897ad4ca3e1 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -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)