unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: About the activation of minor modes
Date: Wed, 09 Mar 2022 01:08:16 +0100	[thread overview]
Message-ID: <87bkygng27.fsf@zoho.eu> (raw)
In-Reply-To: MxfmkoW--3-2@tutanota.com

angelomolina--- via Users list for the GNU Emacs text editor wrote:

>> But you decrease modularity that way.
>>
>> If you want both minor modes for a major mode, just stack
>> them on top of each other when you enable them.
>
> I understand your point. I can keep the various minor-modes
> as they are. But then have a parent minor-mode that
> activates all of them. I am putting the respective files in
> the same directory.

I would stack them in the hook for the major mode where they
are intended to be used.

E.g., if I want `auto-fill-mode' and `abbrev-mode' (minor
modes) in `latex-mode' (major mode) I'd put it like this.

(defun latex-mode-hook-f ()
  (auto-fill-mode)
  (abbrev-mode) )
(add-hook 'latex-mode-hook #'latex-mode-hook-f)

-- 
underground experts united
https://dataswamp.org/~incal




  reply	other threads:[~2022-03-09  0:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-05  2:47 About the activation of minor modes angelomolina--- via Users list for the GNU Emacs text editor
2022-03-05  6:20 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-03-05 15:37   ` angelomolina--- via Users list for the GNU Emacs text editor
2022-03-05 21:49     ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-03-05 22:20     ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-03-07 23:01       ` angelomolina--- via Users list for the GNU Emacs text editor
2022-03-08 18:06         ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-03-08 23:09           ` angelomolina--- via Users list for the GNU Emacs text editor
2022-03-09  0:08             ` Emanuel Berg via Users list for the GNU Emacs text editor [this message]
2022-03-09  9:46               ` angelomolina--- via Users list for the GNU Emacs text editor
2022-03-09 10:24               ` angelomolina--- via Users list for the GNU Emacs text editor
2022-03-06  3:06 ` Eduardo Ochs
2022-03-06  5:01   ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-03-06  5:26     ` Eduardo Ochs
2022-03-06  6:08       ` Emanuel Berg via Users list for the GNU Emacs text editor

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=87bkygng27.fsf@zoho.eu \
    --to=help-gnu-emacs@gnu.org \
    --cc=moasenwood@zoho.eu \
    /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.
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).