[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Automatic minor modes?
From: |
Lars Ingebrigtsen |
Subject: |
Re: Automatic minor modes? |
Date: |
Sat, 14 Apr 2018 17:45:14 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Clément Pit-Claudel <address@hidden> writes:
> On 2018-04-14 10:56, Lars Ingebrigtsen wrote:
>> Do we have a method for this? That is, a way to say "this major mode
>> will activate these minor modes, unless the user has disabled that"?
>
> The way it's usually done is with a globalized minor mode. The major
> mode then sets a variable (eldoc-documentation-function, or
> prettify-symbols-alist), and the minor mode turns itself on based on
> that variable.
Ah, I see. So `hide-password-mode' would be a globalized minor mode
that's on by default, and the ~/.authinfo major mode would set a
`hide-password-alist' (or something) buffer-local variable to signal
that it should do its work in that buffer?
That makes sense.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no