]> git.eshelyaron.com Git - emacs.git/commitdiff
(mail-mode-flyspell-verify): Search for header separator alone on a
authorRichard M. Stallman <rms@gnu.org>
Mon, 29 Dec 2003 20:06:19 +0000 (20:06 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 29 Dec 2003 20:06:19 +0000 (20:06 +0000)
line, literally, and search for it backward, not forward.
(flyspell-abbrev-table): Always use global-abbrev-table if there is no
local one.

lisp/textmodes/flyspell.el

index dc4f521c01866199bfe746850eca8b38bf605758..e71eb440c123d79f3474b751d258c4c9aadb343f 100644 (file)
@@ -267,7 +267,9 @@ property of the major mode name.")
 (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 @@ misspelled words backwards."
 (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 ...                                       */