unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#24171: 25.1; Bytecode returns nil instead of expected closure
@ 2016-08-06 23:16 Michael Heerdegen
  2016-08-07  9:01 ` Andreas Schwab
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Michael Heerdegen @ 2016-08-06 23:16 UTC (permalink / raw)
  To: 24171; +Cc: Alex Vong


Hello,

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.

Compile the defun and load it.  Then,

  (test) -> nil

which is wrong.

Found in

   https://lists.gnu.org/archive/html/help-gnu-emacs/2016-08/msg00038.html


Thanks,

Michael.



In GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.20.6)
 of 2016-08-04 built on drachen
Repository revision: 72221f51439d666d54f5d147f00ecdbb3778ab1b
Windowing system distributor 'The X.Org Foundation', version 11.0.11804000
System Description:	Debian GNU/Linux testing (stretch)

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GSETTINGS NOTIFY
LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11






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

end of thread, other threads:[~2016-08-09 17:05 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-06 23:16 bug#24171: 25.1; Bytecode returns nil instead of expected closure Michael Heerdegen
2016-08-07  9:01 ` Andreas Schwab
2016-08-07  9:30   ` Clément Pit--Claudel
2016-08-07 11:24     ` Andreas Schwab
2016-08-07 22:57   ` Michael Heerdegen
2016-08-07 14:44 ` Stefan Monnier
2016-08-08  2:04 ` Stefan Monnier
2016-08-08 10:38   ` Alex Vong
2016-08-09 17:05     ` Stefan Monnier
2016-08-09  3:26   ` Michael Heerdegen
2016-08-09  3:48     ` Michael Heerdegen

Code repositories for project(s) associated with this public inbox

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

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).