--- Begin Message ---
Subject: |
24.3.50; nadvice.el: named advices not upgradable |
Date: |
Tue, 30 Apr 2013 01:42:14 +0200 |
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.
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#14317: 24.3.50; nadvice.el: named advices not upgradable |
Date: |
Mon, 06 May 2013 11:27:37 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> Is the current behavior intended? If not, can we change it?
Changed, thanks,
Stefan
--- End Message ---