all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Problem when run-hook-with-args with closure
@ 2014-12-18  6:57 Zhongwei Yao
  2014-12-19  9:09 ` Michael Heerdegen
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Zhongwei Yao @ 2014-12-18  6:57 UTC (permalink / raw)
  To: help-gnu-emacs

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-12-22 19:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-18  6:57 Problem when run-hook-with-args with closure Zhongwei Yao
2014-12-19  9:09 ` Michael Heerdegen
2014-12-19  9:56   ` Zhongwei Yao
2014-12-19 11:13     ` Michael Heerdegen
2014-12-19  9:10 ` Michael Heerdegen
2014-12-19 14:11 ` Stefan Monnier
2014-12-22 11:20   ` Zhongwei Yao
2014-12-22 19:07     ` incremental search for "OK " matches "OK" followed by ^M for CR !? ISHIKAWA,Chiaki
2014-12-22 19:10       ` Drew Adams

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.