[Top][All Lists]

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

Re: Automatic minor modes?

From: Clément Pit-Claudel
Subject: Re: Automatic minor modes?
Date: Sat, 14 Apr 2018 12:40:26 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 2018-04-14 11:45, Lars Ingebrigtsen wrote:
> 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's how I would do it, yup.

reply via email to

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