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

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

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


From: Lars Ingebrigtsen
Subject: bug#21440: 25.0.50; Manual: FEATURE-unload-hook in (info "(elisp) Coding Conventions")
Date: Thu, 08 Jul 2021 15:55:01 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Michael Albinus <michael.albinus@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@gnu.org>
AuthorDate: Mon Nov 7 19:39:54 2016 +0200
Commit:     Eli Zaretskii <eliz@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





reply via email to

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