[Top][All Lists]

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

Re: About the activation of minor modes

From: Emanuel Berg
Subject: Re: About the activation of minor modes
Date: Wed, 09 Mar 2022 01:08:16 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

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 ()
  (abbrev-mode) )
(add-hook 'latex-mode-hook #'latex-mode-hook-f)

underground experts united

reply via email to

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