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: Michael Heerdegen
Subject: bug#21440: 25.0.50; Manual: FEATURE-unload-hook in (info "(elisp) Coding Conventions")
Date: Sat, 17 Jul 2021 03:35:09 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Michael Heerdegen <michael_heerdegen@web.de> writes:

> > Hm...  does unload-feature remove advices?  Let's see..
> >
> > Well, there's this:
> >
> > (defun loadhist--unload-function (x)
> > [...]
> >
> > 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.

Here is a simple test file:

#+begin_src emacs-lisp
;;; foo.el --- ...  -*- lexical-binding: t -*-

(defun my-foo--around-ad (f &rest args)
  17
  (apply f args))

(advice-add 'make-frame-command :around #'my-foo--around-ad)

(provide 'foo)
;;; foo.el ends here
#+end_src

Load it, then M-x unload-feature foo RET -- and after that, C-x 5 2
errors.


Michael.





reply via email to

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