Make turn-on-flyspell/turn-off-flyspell obsolete
* lisp/textmodes/flyspell.el (turn-on-flyspell): Make into obsolete function alias for 'flyspell-mode'. (turn-off-flyspell): Declare obsolete. (text-mode-hook): Don't redundantly set :options here. * lisp/textmodes/text-mode.el (text-mode-hook): Prefer 'flyspell-mode' to 'turn-on-flyspell' in :options. (Bug#76535)
This commit is contained in:
parent
24ffcbb3da
commit
bad2cd198a
3 changed files with 17 additions and 13 deletions
6
etc/NEWS
6
etc/NEWS
|
@ -1065,6 +1065,12 @@ allows idle timers and other code to run during this delay period. We
|
|||
consider making this behavior the default in a future Emacs version, so
|
||||
we invite Flyspell users to enable this new option and report issues.
|
||||
|
||||
---
|
||||
*** 'turn-on-flyspell' and 'turn-off-flyspell' are obsolete.
|
||||
To unconditionally enable 'flyspell-mode' from a hook, use this instead:
|
||||
|
||||
(add-hook 'text-mode-hook #'flyspell-mode)
|
||||
|
||||
** Tramp
|
||||
|
||||
+++
|
||||
|
|
|
@ -530,18 +530,6 @@ in your init file.
|
|||
(flyspell-mode -1)))
|
||||
(flyspell--mode-off)))
|
||||
|
||||
;;;###autoload
|
||||
(defun turn-on-flyspell ()
|
||||
"Unconditionally turn on Flyspell mode."
|
||||
(flyspell-mode 1))
|
||||
|
||||
;;;###autoload
|
||||
(defun turn-off-flyspell ()
|
||||
"Unconditionally turn off Flyspell mode."
|
||||
(flyspell-mode -1))
|
||||
|
||||
(custom-add-option 'text-mode-hook 'turn-on-flyspell)
|
||||
|
||||
(defvar flyspell-buffers nil
|
||||
"For remembering buffers running flyspell.")
|
||||
(make-obsolete-variable 'flyspell-buffers "not used." "28.1")
|
||||
|
@ -2408,6 +2396,15 @@ This function is meant to be added to `flyspell-incorrect-hook'."
|
|||
(define-obsolete-function-alias 'flyspell-mode-on 'flyspell--mode-on "30.1")
|
||||
(define-obsolete-function-alias 'flyspell-mode-off 'flyspell--mode-off "30.1")
|
||||
|
||||
;;;###autoload
|
||||
(define-obsolete-function-alias 'turn-on-flyspell #'flyspell-mode "31.1")
|
||||
|
||||
;;;###autoload
|
||||
(defun turn-off-flyspell ()
|
||||
"Unconditionally turn off Flyspell mode."
|
||||
(declare (obsolete flyspell-mode "31.1"))
|
||||
(flyspell-mode -1))
|
||||
|
||||
(provide 'flyspell)
|
||||
|
||||
;;; flyspell.el ends here
|
||||
|
|
|
@ -34,7 +34,8 @@
|
|||
(defcustom text-mode-hook '(text-mode-hook-identify)
|
||||
"Normal hook run when entering Text mode and many related modes."
|
||||
:type 'hook
|
||||
:options '(turn-on-auto-fill turn-on-flyspell)
|
||||
:options '(turn-on-auto-fill flyspell-mode)
|
||||
:version "31.1"
|
||||
:group 'text)
|
||||
|
||||
(defvar text-mode-variant nil
|
||||
|
|
Loading…
Add table
Reference in a new issue