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.

Aliases

flyspell-mode-off (obsolete since 30.1)

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/flyspell.el.gz
;;*---------------------------------------------------------------------*/
;;*    flyspell--mode-off ...                                           */
;;*---------------------------------------------------------------------*/
;;;###autoload
(defun flyspell--mode-off ()
  "Turn Flyspell mode off."
  (remove-hook 'post-command-hook (function flyspell-check-changes) t)
  (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)
  (flyspell-delete-all-overlays)
  (setq flyspell-pre-buffer nil)
  (setq flyspell-pre-point  nil)
  (setq flyspell-mode nil))