From 53287eb034af729bf61f579892fbd21b382de445 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Fri, 29 Dec 2000 15:14:51 +0000 Subject: [PATCH] (mail-mode-flyspell-verify): Spell-check in Subject line. --- lisp/textmodes/flyspell.el | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) 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) -- 2.39.2