[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: |
Stefan Monnier |
Subject: |
bug#67207: [PATCH] Add elixir-ts-mode-hook to elixir-ts-mode |
Date: |
Sat, 18 Nov 2023 22:39:30 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
>>> 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.
> After I had a look how it works, it seems pretty convenient for users
> relying on customize menus and not knowing which hooks might be useful.
> There are some modes using this feature, but its not consistently used.
Yes but it's unreliable: as soon as some code uses `add-hook` on this
hook variable, Custom gets all confused because it doesn't know
why/where the variable has a different value from the one it expected.
> Won't it make sense to define a hook to custom anyways, so that users
> get used to the idea of using the customize menus to add hooks?
As long as Custom breaks down when someone uses `add-hook`, I don't feel
comfortable exposing unsuspecting users to the brittleness of hooks in
Custom :-(
Custom's main audience is specifically those users who don't (want to) know
about such tricky interactions.
> Only after using Emacs for 5+ years now I am only now discovering the
> convenience of the customize menu, probably getting too lazy to update
> init.el.
:-)
Stefan