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: Michael Heerdegen
Subject: Re: Problem when run-hook-with-args with closure
Date: Fri, 19 Dec 2014 10:09:42 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

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.




reply via email to

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