This library generates manual C++ template instantiations. It should
no longer be useful on modern compilers, which do this automatically.
+** Ispell
+
+---
+*** New hook 'ispell-change-dictionary-hook'.
+This runs after changing the dictionary and could be used to
+automatically spellcheck a buffer when changing language without
+needing to advice 'ispell-change-dictionary'.
+
\f
* New Modes and Packages in Emacs 27.1
(message "Ispell process killed")
nil))
+(defvar ispell-change-dictionary-hook nil
+ "Hook run after changing dictionary.")
+
;; ispell-change-dictionary is set in some people's hooks. Maybe this should
;; call ispell-init-process rather than wait for a spell checking command?
(ispell-internal-change-dictionary)
(message "Using %s dictionary"
(or (and (not arg) ispell-local-dictionary)
- ispell-dictionary "default")))
+ ispell-dictionary "default"))
+ (run-hooks 'ispell-change-dictionary-hook))
((equal dict (or (and (not arg) ispell-local-dictionary)
ispell-dictionary "default"))
;; Specified dictionary is the default already. Could reload
(setq ispell-buffer-session-localwords nil)
(message "%s Ispell dictionary set to %s"
(if arg "Global" "Local")
- dict))))
+ dict)
+ (run-hooks 'ispell-change-dictionary-hook))))
(defun ispell-internal-change-dictionary ()
"Update the dictionary and the personal dictionary used by Ispell.