help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [External] : add-hook without need for intermediate functions


From: Drew Adams
Subject: RE: [External] : add-hook without need for intermediate functions
Date: Fri, 9 Jun 2023 16:56:19 +0000

> I have seen that since Emacs 24.1 one does not need the intermediate
> 'turn-on-foo-mode' style functions when using hooks.
> 
> Does this apply to all modes, including minor modes ?
> And thusly one can write
> (add-hook 'emacs-lisp-mode-hook #'foo-minor-mode)

See `define-globalized-minor-mode'.

https://www.gnu.org/software/emacs/manual/html_node/elisp/Defining-Minor-Modes.html

reply via email to

[Prev in Thread] Current Thread [Next in Thread]