[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem when run-hook-with-args with closure
From: |
Zhongwei Yao |
Subject: |
Problem when run-hook-with-args with closure |
Date: |
Thu, 18 Dec 2014 14:57:23 +0800 |
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
By the way, this problem is from the compile.el and when
compilation-finish-functions is set, emacs 24.3.1 would give same error:
Symbol's function definition is void: closure
And 24.4.1 is OK.
My problem is Why 24.3.1 returns this? How can I solve it on 24.3.1?
Thanks,
Zhongwei
- Problem when run-hook-with-args with closure,
Zhongwei Yao <=