"Spell checking on the fly."
:tag "FlySpell"
:prefix "flyspell-"
+ :group 'ispell
:group 'processes)
;*---------------------------------------------------------------------*/
(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
;*---------------------------------------------------------------------*/
(eval-when-compile (defvar flyspell-local-mouse-map))
+;;;###autoload
(defvar flyspell-mode nil)
(make-variable-buffer-local 'flyspell-mode)
;; 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)
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...")))))
(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
(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 ... */
(provide 'flyspell)
+;;; arch-tag: 05d915b9-e9cf-44fb-9137-fc28f5eaab2a
;;; flyspell.el ends here