From: Michael Heerdegen <michael_heerdegen@web.de>
To: 21440@debbugs.gnu.org
Subject: bug#21440: 25.0.50; Manual: FEATURE-unload-hook in (info "(elisp) Coding Conventions")
Date: Wed, 09 Sep 2015 13:43:36 +0200 [thread overview]
Message-ID: <87k2rzakd3.fsf@web.de> (raw)
Hi,
In (info "(elisp) Coding Conventions"):
• If loading the file adds functions to hooks, define a function
‘FEATURE-unload-hook’, where FEATURE is the name of the feature the
package provides, and make it undo any such changes. Using
‘unload-feature’ to unload the file will run this function. *Note
Unloading.
A problematic tip:
- it is unnecessary for that reason. AFAIK FEATURE's functions are
removed automatically from hooks by `unload-feature'.
- When you follow the advice, `unload-feature' will skip removing
entries from `auto-mode-alist', so you would have to do that yourself.
- Isn't `FEATURE-unload-function' the preferred thing to use today?
The doc string of `unload-feature' doesn't even mention
FEATURE-unload-hook variables. Seems it is discouraged to be used.
BTW, I miss a comment what I should do if a feature added functions to
the buffer local binding of a hook. Does `unload-feature' take care of
that (doesn't seem so)? Nothing about this in (info "(elisp) Unloading").
Thanks,
Michael.
In GNU Emacs 25.0.50.19 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.6)
of 2015-09-07
Repository revision: af629df80605614c645ba6539bb98d4f1e990925
Windowing system distributor 'The X.Org Foundation', version 11.0.11702000
System Description: Debian GNU/Linux testing (stretch)
next reply other threads:[~2015-09-09 11:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-09 11:43 Michael Heerdegen [this message]
2020-08-15 13:53 ` bug#21440: 25.0.50; Manual: FEATURE-unload-hook in (info "(elisp) Coding Conventions") Stefan Kangas
2020-08-17 11:15 ` Michael Albinus
2021-07-08 13:55 ` Lars Ingebrigtsen
2021-07-12 3:56 ` Michael Heerdegen
2021-07-12 11:59 ` Eli Zaretskii
2021-07-12 12:05 ` Lars Ingebrigtsen
2021-07-16 1:23 ` Michael Heerdegen
2021-07-16 9:01 ` Lars Ingebrigtsen
2021-07-17 1:21 ` Michael Heerdegen
2021-07-17 1:35 ` Michael Heerdegen
2021-07-17 14:08 ` Lars Ingebrigtsen
2021-07-21 2:45 ` Michael Heerdegen
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=87k2rzakd3.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=21440@debbugs.gnu.org \
/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.