From: "Clément Pit-Claudel" <cpitclaudel@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: emacs-devel@gnu.org
Subject: Re: Automatic minor modes?
Date: Sat, 14 Apr 2018 12:40:26 -0400 [thread overview]
Message-ID: <533e5cc6-977e-29bf-5fd3-52380e76ea0c@gmail.com> (raw)
In-Reply-To: <87muy5hjw5.fsf@mouse.gnus.org>
On 2018-04-14 11:45, Lars Ingebrigtsen wrote:
> Clément Pit-Claudel <cpitclaudel@gmail.com> 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.
prev parent reply other threads:[~2018-04-14 16:40 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-14 14:56 Automatic minor modes? Lars Ingebrigtsen
2018-04-14 11:49 ` Charles A. Roelli
2018-04-14 18:59 ` Lars Ingebrigtsen
2018-04-14 15:23 ` Yuri Khan
2018-04-14 15:27 ` Lars Ingebrigtsen
2018-06-27 1:31 ` Ted Zlatanov
2018-07-22 12:26 ` Lars Ingebrigtsen
2018-07-22 15:51 ` Clément Pit-Claudel
2018-07-22 19:01 ` Stefan Monnier
2018-07-22 20:06 ` Clément Pit-Claudel
2018-10-08 1:05 ` Ted Zlatanov
2018-10-08 14:57 ` Stefan Monnier
2018-10-09 19:44 ` Ted Zlatanov
2018-10-14 3:59 ` Ted Zlatanov
2018-10-14 14:44 ` Eli Zaretskii
2018-10-14 15:48 ` Ted Zlatanov
2018-10-14 16:05 ` Eli Zaretskii
2018-10-14 18:23 ` Hiding passords in authinfo (was: Automatic minor modes?) Stefan Monnier
2018-10-14 19:31 ` Hiding passords in authinfo Ted Zlatanov
2018-10-14 20:55 ` Stefan Monnier
2018-04-14 15:39 ` Automatic minor modes? Clément Pit-Claudel
2018-04-14 15:45 ` Lars Ingebrigtsen
2018-04-14 16:40 ` Clément Pit-Claudel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=533e5cc6-977e-29bf-5fd3-52380e76ea0c@gmail.com \
--to=cpitclaudel@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).