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

From: Michael Heerdegen <[email-masked]>
Date: Sat, 17 Jul 2021 03:21:51 +0200

Lars Ingebrigtsen <[email-masked]> writes:

> I've now clarified that section...

Thanks, Lars.

> > (should we add advices to that list btw?).
>
> Hm...  does unload-feature remove advices?  Let's see..
>
> Well, there's this:
>
> (defun loadhist--unload-function (x)
>   (let ((fun (cdr x)))
>     (when (fboundp fun)
>       (when (fboundp 'ad-unadvise)
> 	(ad-unadvise fun))
>
> Hm...  but is that what it does?

I don't think so.  AFAIU this does not even effect nadvice advices, and
treats only advises of functions defined by the feature.

Michael.