bug#81550: 30.2; add project-specific hooks to unload-feature-special-hooks
Eli Zaretskii <[email protected]> Tue, 04 Aug 2026 17:04:11 +0300
| Newsgroups | gmane.emacs.bugs |
|---|---|
| Message-ID | <[email protected]> |
> From: Lin Jian <[email protected]> > Cc: [email protected], [email protected] > Date: Tue, 04 Aug 2026 21:30:37 +0800 > > Eli Zaretskii <[email protected]> writes: > > >> From: Lin Jian <[email protected]> > >> Cc: [email protected], [email protected] > >> Date: Tue, 04 Aug 2026 20:10:40 +0800 > >> > >> Eli Zaretskii <[email protected]> writes: > >> > >> >> Cc: [email protected] > >> >> Date: Tue, 04 Aug 2026 15:28:33 +0800 > >> >> From: Lin Jian via "Bug reports for GNU Emacs, > >> >> the Swiss army knife of text editors" <[email protected]> > >> >> > >> >> > >> >> When supporting `unload-feature' for my project backend, I have to write > >> >> a FEATURE-unload-function to clean `project-find-functions' and > >> >> `project-list-exclude'. > >> >> > >> >> That FEATURE-unload-function can be omitted if `project-find-functions' > >> >> and `project-list-exclude' are added to `unload-feature-special-hooks'. > >> >> I suggest adding them. > >> > > >> > Does it really happen frequently that unloading a feature affects > >> > which files project.el will consider, or is that a rare corner case? > >> > >> If by "a feature" you mean a random feature, then probably that random > >> feature does not need to clean project-specific hooks. > >> > >> However, note that I do not mean a random feature. I mean specific > >> features: project backends. See C-h P project RET for definition of > >> project backend. These specific features always have to clean > >> project-specific hooks if they decide to support `unload-feature'. > > > > But unload-feature-special-hooks is a general hook, not limited to > > project backends, is it? Or what am I missing? > > To be clear, I am not arguing anything. I just try to clarify things, > in case needed. > > If, in your first reply, you said something like: > > > Project backends are rare features so we should not add > > project-specific hooks to `unload-feature-special-hooks'. > > Then I would find it clear and I would see no need to clarify it. Thanks, let's wait for Dmitry to chime in.