GNU bug report logs -
#14317
24.3.50; nadvice.el: named advices not upgradable
Previous Next
Reported by: michael_heerdegen <at> web.de
Date: Mon, 29 Apr 2013 23:43:02 UTC
Severity: normal
Found in version 24.3.50
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hi Stefan,
if you have some code adding advices that can be identified (i.e.,
adding named advices or fbound symbols, not anonymous functions),
and you change this code defining the advice and re-evaluate, the change
doesn't take effect (in contrast to the behavior of advice.el).
We currently use this:
--8<---------------cut here---------------start------------->8---
(defun advice--add-function (where ref function props)
(unless (advice--member-p function (cdr (assq 'name props))
(gv-deref ref))
(setf (gv-deref ref)
(advice--make where function (gv-deref ref) props))))
--8<---------------cut here---------------end--------------->8---
but as a user, I would suspect something like
--8<---------------cut here---------------start------------->8---
(defun advice--add-function (where ref function props)
(when (advice--member-p function (cdr (assq 'name props))
(gv-deref ref))
(advice--remove-function .........))
(setf (gv-deref ref)
(advice--make where function (gv-deref ref) props)))
--8<---------------cut here---------------end--------------->8---
i.e., replacing the old code, instead of doing nothing.
Is the current behavior intended? If not, can we change it?
Regards,
Michael.
This bug report was last modified 12 years and 19 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.