unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Emacs mailing list <help-gnu-emacs@gnu.org>
Subject: Re: Problem when run-hook-with-args with closure
Date: Fri, 19 Dec 2014 10:10:09 +0100	[thread overview]
Message-ID: <87ioh8ngu4.fsf@web.de> (raw)
In-Reply-To: <CAJnfWeFmL-xcp54vvz4R40-DZ199trj05_6UgH=7eS1tnz+wEw@mail.gmail.com> (Zhongwei Yao's message of "Thu, 18 Dec 2014 14:57:23 +0800")

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.



  parent reply	other threads:[~2014-12-19  9:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ioh8ngu4.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).