help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Dynamically constructing advice behaves strangely


From: Marcin Borkowski
Subject: Re: Dynamically constructing advice behaves strangely
Date: Sun, 14 Feb 2016 21:57:30 +0100
User-agent: mu4e 0.9.13; emacs 25.1.50.2

On 2016-02-14, at 16:34, Michael Heerdegen <michael_heerdegen@web.de> wrote:

> Marcin Borkowski <mbork@mbork.pl> writes:
>
>> This works (i.e., M-: foo-fun properly runs the advice), but I expected
>> the symbol `advice-for-foo-fun' to have this piece of advice in its
>> function cell - and it does not.  Why?
>
> You bind the function to a new uninterned symbol (`make-symbol'), which
> is not what you want.  You want `intern'.

Stupid me.  Thanks for pointing that out.  My code works perfectly now.
I'm pretty sure I'll blog about it soon; also I'll post a message on
this ML in a few minutes.

> Michael.

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



reply via email to

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