GNU bug report logs - #21440
25.0.50; Manual: FEATURE-unload-hook in (info "(elisp) Coding Conventions")

Previous Next

Package: emacs;

Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>

Date: Wed, 9 Sep 2015 11:44:02 UTC

Severity: minor

Found in version 25.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 21440 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, 21440 <at> debbugs.gnu.org,
 Stefan Kangas <stefan <at> marxist.se>
Subject: Re: bug#21440: 25.0.50; Manual: FEATURE-unload-hook in (info
 "(elisp) Coding Conventions")
Date: Thu, 08 Jul 2021 15:55:01 +0200
Michael Albinus <michael.albinus <at> gmx.de> writes:

>>>    • 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.

[...]

> As a test, I've renamed `tramp-unload-hook' and all
> `tramp-FEATURE-unload-hook' variables to `tramp-unload-function' and
> `tramp-FEATURE-unload-function', respectively. The related test,
> `tramp-test45-unload', fails now. I haven't debugged further, but
> throwing a warning when `FEATURE-unload-hook' is used, looks premature
> to me.

The quoted text no longer exists in Emacs 28 -- it now refers to
-unload-function.  Because:

commit 8da810f91b11a258a7ed0f5315292143072881d8
Author:     Eli Zaretskii <eliz <at> gnu.org>
AuthorDate: Mon Nov 7 19:39:54 2016 +0200
Commit:     Eli Zaretskii <eliz <at> gnu.org>
CommitDate: Mon Nov 7 19:39:54 2016 +0200

    Don't refer to obsolete FEATURE-unload-hook
    
    * doc/lispref/tips.texi (Coding Conventions): Refer to
    FEATURE-unload-function rather than its obsolete variant
    FEATURE-unload-hook.  (Bug#24890)

But I don't know whether -unload-function has the same problems that
-unload-hook had?  And I see that there's still a lot of things called
-unload-hook in Emacs...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 3 years and 363 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.