[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Hooks in minor modes
From: |
Stefan Monnier |
Subject: |
Re: Hooks in minor modes |
Date: |
Thu, 29 Apr 2021 23:31:57 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> Is it acceptable to set mode hooks in a minor mode so that the minor
> mode is available by default, rather than requiring the user to include
>
> (add-hook 'texinfo-mode-hook 'my-minor-mode))
Depends when you do that and it likely depends whom you ask.
The convention that we strongly encourage to follow is that *loading* an
ELisp file should not noticeably change Emacs's behavior (among other
things, because files may be loaded without the user's explicit
request). So doing such an `add-hook` at the top-level of your file
would probably not be considered as acceptable from that point of view
(unless activating `my-minor-mode` by default has no visible effect,
which is definitely possible but unusual).
Stefan
- Hooks in minor modes, steve-humphreys, 2021/04/29
- Re: Hooks in minor modes, Emanuel Berg, 2021/04/29
- Re: Hooks in minor modes,
Stefan Monnier <=
- Re: Hooks in minor modes, steve-humphreys, 2021/04/30
- Re: Hooks in minor modes, Emanuel Berg, 2021/04/30
- require (was: Re: Hooks in minor modes), Emanuel Berg, 2021/04/30
- Re: require (was: Re: Hooks in minor modes), Emanuel Berg, 2021/04/30
- Re: require (was: Re: Hooks in minor modes), Jean Louis, 2021/04/30
- Re: require (was: Re: Hooks in minor modes), Emanuel Berg, 2021/04/30
- Re: require (was: Re: Hooks in minor modes), Jean Louis, 2021/04/30
- Re: require (was: Re: Hooks in minor modes), Emanuel Berg, 2021/04/30
- FW: [External] : Re: require (was: Re: Hooks in minor modes), Drew Adams, 2021/04/30
- Re: FW: [External] : Re: require (was: Re: Hooks in minor modes), Emanuel Berg, 2021/04/30