[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [External] : add-hook without need for intermediate functions
From: |
uzibalqa |
Subject: |
RE: [External] : add-hook without need for intermediate functions |
Date: |
Fri, 09 Jun 2023 17:30:03 +0000 |
------- Original Message -------
On Saturday, June 10th, 2023 at 5:15 AM, Drew Adams <drew.adams@oracle.com>
wrote:
> > I do not follow how to extract the information in your link to answer my
> > question.
> > My focus is only about a simple minor mode rather than a globalised one.
>
>
> Reread what you asked:
>
> Does not needing a `turn-on-foo-mode' function
> apply to all modes, including minor modes?
>
> The doc I cited tells you that that not-needing
> doesn't apply to globalized minor modes.
>
> That's the only occurrence of "turn-on" in the
> Elisp manual.
I mean this
(add-hook 'emacs-lisp-mode-hook #'foo-minor-mode)
versus this
(defun turn-on-foo ()
"Enable foo"
(foo-minor-mode 1)
)
(add-hook 'emacs-lisp-mode-hook #'turn-on-foo)
Re: add-hook without need for intermediate functions, Platon Pronko, 2023/06/10