]> code.delx.au - gnu-emacs/blobdiff - lisp/textmodes/flyspell.el
(tex-shell): Set error parsing function here.
[gnu-emacs] / lisp / textmodes / flyspell.el
index 292df46976d04a15bcc70117301ac4c0c13573bc..3d41042e8d77c5022ec776ad9345727bf290fc9a 100644 (file)
@@ -51,6 +51,7 @@
   "Spell checking on the fly."
   :tag "FlySpell"
   :prefix "flyspell-"
+  :group 'ispell
   :group 'processes)
 
 ;*---------------------------------------------------------------------*/
@@ -266,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
@@ -381,6 +384,7 @@ property of the major mode name.")
 ;*---------------------------------------------------------------------*/
 (eval-when-compile (defvar flyspell-local-mouse-map))
 
+;;;###autoload
 (defvar flyspell-mode nil)
 (make-variable-buffer-local 'flyspell-mode)
 
@@ -548,9 +552,9 @@ in your .emacs file.
   ;; otherwise it could be too late, the local dictionary may
   ;; be forgotten!
   (flyspell-accept-buffer-local-defs)
-  ;; we put the `flyspel-delayed' property on some commands
+  ;; we put the `flyspell-delayed' property on some commands
   (flyspell-delay-commands)
-  ;; we put the `flyspel-deplacement' property on some commands
+  ;; we put the `flyspell-deplacement' property on some commands
   (flyspell-deplacement-commands)
   ;; we bound flyspell action to post-command hook
   (add-hook 'post-command-hook (function flyspell-post-command-hook) t t)
@@ -1347,7 +1351,7 @@ Word syntax described by `ispell-dictionary-alist' (which see)."
                                               ispell-personal-dictionary)))))
                      (setq args (append args ispell-extra-args))
                      args))))
-      (if (= c 0)
+      (if (eq c 0)
          (flyspell-external-point-words)
        (error "Can't check region...")))))
 
@@ -1493,6 +1497,7 @@ for the overlay."
     (overlay-put flyspell-overlay 'mouse-face mouse-face)
     (overlay-put flyspell-overlay 'flyspell-overlay t)
     (overlay-put flyspell-overlay 'evaporate t)
+    (overlay-put flyspell-overlay 'help-echo "mouse-2: correct word at point")
     (if flyspell-use-local-map
         (overlay-put flyspell-overlay
                      flyspell-overlay-keymap-property-name
@@ -1625,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 ...                                       */
@@ -2120,4 +2125,5 @@ This function is meant to be added to 'flyspell-incorrect-hook'."
 
 (provide 'flyspell)
 
+;;; arch-tag: 05d915b9-e9cf-44fb-9137-fc28f5eaab2a
 ;;; flyspell.el ends here