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

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

[debbugs-tracker] bug#14317: closed (24.3.50; nadvice.el: named advices


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#14317: closed (24.3.50; nadvice.el: named advices not upgradable)
Date: Mon, 06 May 2013 15:29:02 +0000

Your message dated Mon, 06 May 2013 11:27:37 -0400
with message-id <address@hidden>
and subject line Re: bug#14317: 24.3.50; nadvice.el: named advices not 
upgradable
has caused the debbugs.gnu.org bug report #14317,
regarding 24.3.50; nadvice.el: named advices not upgradable
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
14317: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14317
GNU Bug Tracking System
Contact address@hidden with problems
--- 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 ---

reply via email to

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