Function: flyspell-mode-off

flyspell-mode-off is an autoloaded and byte-compiled function defined in flyspell.el.gz.

Signature

(flyspell-mode-off)

Documentation

Turn Flyspell mode off.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/flyspell.el.gz
;;*---------------------------------------------------------------------*/
;;*    flyspell-mode-off ...                                            */
;;*---------------------------------------------------------------------*/
;;;###autoload
(defun flyspell-mode-off ()
  "Turn Flyspell mode off."
  ;; We remove the hooks.
  (remove-hook 'post-command-hook (function flyspell-post-command-hook) t)
  (remove-hook 'pre-command-hook (function flyspell-pre-command-hook) t)
  (remove-hook 'after-change-functions 'flyspell-after-change-function t)
  (remove-hook 'hack-local-variables-hook
	       (function flyspell-hack-local-variables-hook) t)
  ;; We remove all the flyspell highlightings.
  (flyspell-delete-all-overlays)
  ;; We have to erase pre cache variables.
  (setq flyspell-pre-buffer nil)
  (setq flyspell-pre-point  nil)
  ;; We mark the mode as killed.
  (setq flyspell-mode nil))