[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#67207: [PATCH] Add elixir-ts-mode-hook to elixir-ts-mode
From: |
Eli Zaretskii |
Subject: |
bug#67207: [PATCH] Add elixir-ts-mode-hook to elixir-ts-mode |
Date: |
Sat, 18 Nov 2023 12:03:55 +0200 |
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Wilhelm Kirschbaum <wkirschbaum@gmail.com>, 67207@debbugs.gnu.org
> Date: Wed, 15 Nov 2023 17:53:52 -0500
>
> > Stefan, does this mean define-derived-mode has some deficiency?
> > Many/most modes defined using it don't have an explicit hook
> > definition, so should we now define a mode hook for all of them?
>
> Usually we don't have good ideas of `:options` to provide for hook
> variables, so it's not very useful to expose them to Custom.
>
> Also, it's not rare for hook variables to be modified by other packages,
> which again votes in favor of not exposing them to Custom.
>
> But some mode maintainers do like to expose them to Custom for their
> users' convenience. Usually I look at it as a hint that there's
> something missing elsewhere (for the patch at hand, maybe some kind of
> `global-eglot-mode` would be a better answer in the longer term).
>
> We could try and extend `define-derived-mode` to allow it to expose the
> hook to Custom, with `:options` and whatnot, but it doesn't seem worth
> the trouble since the maintainer can use a separate explicit `defcustom`
> instead, as the OP's patch does.
Thanks, I installed the change and added a comment regarding the
reasons.
Closing.