GNU bug report logs - #24171
25.1; Bytecode returns nil instead of expected closure

Previous Next

Package: emacs;

Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>

Date: Sat, 6 Aug 2016 23:23:02 UTC

Severity: normal

Found in version 25.1

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Clément Pit--Claudel <clement.pit <at> gmail.com>
Cc: 24171 <at> debbugs.gnu.org
Subject: bug#24171: 25.1; Bytecode returns nil instead of expected closure
Date: Sun, 07 Aug 2016 13:24:51 +0200
On So, Aug 07 2016, Clément Pit--Claudel <clement.pit <at> gmail.com> wrote:

> On 2016-08-07 05:01, Andreas Schwab wrote:
>> Michael Heerdegen <michael_heerdegen <at> web.de> writes:
>> 
>>> eval this defun:
>>>
>>> (defun test ()
>>>   (let ((my-cool-fun 'dummy))
>>>     (let ((my-cool-fun
>>>            (let ((calculate (lambda () 1)))
>>>              (lambda () (setq my-cool-fun calculate))))
>>>           (return-my-cool-fun (lambda () my-cool-fun)))
>>>       (funcall my-cool-fun)
>>>       (funcall return-my-cool-fun))))
>>>
>>> (test) evals to a closure as expected.
>> 
>> ELISP> (test)
>> *** Eval error ***  Symbol’s value as variable is void: calculate
>
> I can reproduce this. Andreas, are you missing ;; -*- lexical-binding: t; -*- ?

I was following the instructions.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




This bug report was last modified 8 years and 339 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.