help-gnu-emacs
[Top][All Lists]
Advanced

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

Is it a good idea to use `add-hook' and `remove-hook' in a minor mode?


From: mbork
Subject: Is it a good idea to use `add-hook' and `remove-hook' in a minor mode?
Date: Thu, 22 May 2025 06:03:38 +0200

Hi all,

I'd like to define a minor mode which enables me to use ElDoc to show
some information about the thing at point.  Is it a good practice to use
`add-hook' and `remove-hook' in its definition to add/remove my function
to/from `eldoc-documentation-functions'?  AFAIU, hooks are usually to be
used by the user and not modified by a mode.  OTOH, giving the user
a minor mode seems more user-friendly than just telling them to manually
add a function to a hook.  WDYT?

Best,

-- 
Marcin Borkowski
https://mbork.pl
https://crimsonelevendelightpetrichor.net/



reply via email to

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