diff lisp/textmodes/flyspell.el @ 53420:95e0a0bdebb2

(mail-mode-flyspell-verify): Search for header separator alone on a line, literally, and search for it backward, not forward. (flyspell-abbrev-table): Always use global-abbrev-table if there is no local one.
author Richard M. Stallman <rms@gnu.org>
date Mon, 29 Dec 2003 20:06:19 +0000
parents 695cf19ef79e
children 79093b308520
line wrap: on
line diff
--- a/lisp/textmodes/flyspell.el	Mon Dec 29 20:03:46 2003 +0000
+++ b/lisp/textmodes/flyspell.el	Mon Dec 29 20:06:19 2003 +0000
@@ -267,7 +267,9 @@
 (defun mail-mode-flyspell-verify ()
   "This function is used for `flyspell-generic-check-word-p' in Mail mode."
   (let ((in-headers (save-excursion
-		      (re-search-forward mail-header-separator nil t)))
+		      ;; When mail-header-separator is "",
+		      ;; it is likely to be found in both directions.
+		      (not (re-search-backward (concat "^" (regexp-quote mail-header-separator) "$") nil t))))
 	(in-signature (save-excursion
 			(re-search-backward message-signature-separator nil t))))
     (cond (in-headers
@@ -1628,7 +1630,7 @@
 (defun flyspell-abbrev-table ()
   (if flyspell-use-global-abbrev-table-p
       global-abbrev-table
-    local-abbrev-table))
+    (or local-abbrev-table global-abbrev-table)))
 
 ;*---------------------------------------------------------------------*/
 ;*    flyspell-define-abbrev ...                                       */