bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24171: 25.1; Bytecode returns nil instead of expected closure


From: Clément Pit--Claudel
Subject: bug#24171: 25.1; Bytecode returns nil instead of expected closure
Date: Sun, 7 Aug 2016 05:30:31 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

On 2016-08-07 05:01, Andreas Schwab wrote:
> Michael Heerdegen <michael_heerdegen@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; -*- ?

Clément.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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