GNU bug report logs - #28990
27.0.50; thunk-delay: running expansion also requires lexical-binding

Previous Next

Package: emacs;

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

Date: Wed, 25 Oct 2017 13:49:02 UTC

Severity: minor

Found in version 27.0.50

Done: Michael Heerdegen <michael_heerdegen <at> web.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#28990: closed (27.0.50; thunk-delay: running expansion also
 requires lexical-binding)
Date: Wed, 01 Nov 2017 14:10:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Wed, 01 Nov 2017 15:08:47 +0100
with message-id <87o9omm6q8.fsf <at> web.de>
and subject line Re: bug#28990: 27.0.50; thunk-delay: running expansion also requires lexical-binding
has caused the debbugs.gnu.org bug report #28990,
regarding 27.0.50; thunk-delay: running expansion also requires lexical-binding
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
28990: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=28990
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: bug-gnu-emacs <at> gnu.org
Cc: Nicolas Petton <nicolas <at> petton.fr>
Subject: 27.0.50; thunk-delay: running expansion also requires lexical-binding
Date: Wed, 25 Oct 2017 15:47:45 +0200
Hello,

having only lexical-binding: t in "thunk.el"'s header is not sufficient:
to make thunks work ok, `thunk-delay' needs lexical-binding when the
expansion is run.

Try e.g. something trivial as

#+begin_src emacs-lisp
(defun my-thunk-test ()
  (thunk-force (thunk-delay (+ 1 2))))
#+end_src

This compiles ok, but executing (my-thunk-test) without lexbind enabled
gives you a meaningless error like "void-variable: forced".

I think we should document (in the file header) that lexical-binding
mode is required when thunks are created with `thunk-delay'.  I think we
could additionally raise an error in the expansion of `thunk-delay' when
lexical-binding -> nil.


TIA,

Michael.




In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.24)
 of 2017-10-25 built on drachen
Repository revision: cb73c70180f57f3fb99fae3aaefbacf0a61cea3f
Windowing system distributor 'The X.Org Foundation', version 11.0.11905000
System Description:	Debian GNU/Linux testing (buster)



[Message part 3 (message/rfc822, inline)]
From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Nicolas Petton <nicolas <at> petton.fr>
Cc: 28990-done <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#28990: 27.0.50;
 thunk-delay: running expansion also requires lexical-binding
Date: Wed, 01 Nov 2017 15:08:47 +0100
Nicolas Petton <nicolas <at> petton.fr> writes:

> > Nicolas, Stefan - ok to fix it like that?
>
> Yes, that's fine with me.
>
> > I would additionally add a sentence to "thunk.el"'s header saying that
> > creating thunks requires lexical binding.
>
> That's a good idea, thanks.

Done in bbb85eff49.

Michael.


This bug report was last modified 7 years and 199 days ago.

Previous Next


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