all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: angelomolina--- via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: Emanuel Berg <moasenwood@zoho.eu>
Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org>
Subject: Re: About the activation of minor modes
Date: Wed, 9 Mar 2022 10:46:13 +0100 (CET)	[thread overview]
Message-ID: <Mxi3aEd--3-2@tutanota.com> (raw)
In-Reply-To: <87bkygng27.fsf@zoho.eu>

Mar 9, 2022, 00:08 by help-gnu-emacs@gnu.org:

> 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)
>

Whilst I have written some minor modes which I enable using 
add-hook,  I am not confident how I can call the minor-mode
using something similar to (abbrev-mode), e.g.  (toromona-mode).

Currently I have

  (add-hook 'prog-mode-hook    'toromona-minor-mode) 
  (add-hook 'texinfo-mode-hook 'toromona-minor-mode)








  reply	other threads:[~2022-03-09  9:46 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
2022-03-09  9:46               ` angelomolina--- via Users list for the GNU Emacs text editor [this message]
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Mxi3aEd--3-2@tutanota.com \
    --to=help-gnu-emacs@gnu.org \
    --cc=angelomolina@tutanota.com \
    --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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.