[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: About the activation of minor modes
From: |
angelomolina |
Subject: |
Re: About the activation of minor modes |
Date: |
Wed, 9 Mar 2022 10:46:13 +0100 (CET) |
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)
- About the activation of minor modes, angelomolina, 2022/03/04
- Re: About the activation of minor modes, Emanuel Berg, 2022/03/05
- Re: About the activation of minor modes, angelomolina, 2022/03/05
- Re: About the activation of minor modes, Emanuel Berg, 2022/03/05
- Re: About the activation of minor modes, Emanuel Berg, 2022/03/05
- Re: About the activation of minor modes, angelomolina, 2022/03/07
- Re: About the activation of minor modes, Emanuel Berg, 2022/03/08
- Re: About the activation of minor modes, angelomolina, 2022/03/08
- Re: About the activation of minor modes, Emanuel Berg, 2022/03/08
- Re: About the activation of minor modes,
angelomolina <=
- Re: About the activation of minor modes, angelomolina, 2022/03/09
Re: About the activation of minor modes, Eduardo Ochs, 2022/03/05