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

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

Re: Problem when run-hook-with-args with closure


From: Zhongwei Yao
Subject: Re: Problem when run-hook-with-args with closure
Date: Fri, 19 Dec 2014 17:56:37 +0800

On Fri, Dec 19, 2014 at 5:09 PM, Michael Heerdegen <michael_heerdegen@web.de
> wrote:
>
> Zhongwei Yao <ashi08104@gmail.com> writes:
>
> > Hi, list,
> > I try following code on both emacs 24.4.1 and 24.3.1:
> >
> > (setq lexical-binding t)
> > (let ((x 1))
> >   (setq foo
> >         (lambda (y)
> >           (message "x+y=%d" (+ x y)))))
> > (run-hook-with-args 'foo 1)
> >
> > On emacs 24.4.1, it runs and print: "x+y=2" as expected.
> > On emacs 24.3.1, it gives error:
> >   run-hook-with-args: Symbol's function definition is void: closure
>
> That had been a bug in 24.3 IMO.
>
> > And 24.4.1 is OK.
>
> I also can't reproduce it using my trunk built. So it has seemingly be
> fixed.
>
> > How can I solve it on 24.3.1?
>
> I can't give an advice better than "try to avoid the problem" or "please
> upgrade".
>
>
> Michael.
>
>
> Michael, Thanks.

However, a problem (http://sourceforge.net/p/cedet/mailman/message/33153606/)
in latest emacs (24.4.1) prevents me upgrading:(

--
Zhongwei


reply via email to

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