all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: 28990@debbugs.gnu.org
Cc: Nicolas Petton <nicolas@petton.fr>
Subject: bug#28990: 27.0.50; thunk-delay: running expansion also requires lexical-binding
Date: Wed, 25 Oct 2017 15:47:45 +0200	[thread overview]
Message-ID: <87po9be3um.fsf@web.de> (raw)


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)






             reply	other threads:[~2017-10-25 13:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-25 13:47 Michael Heerdegen [this message]
2017-10-27 14:08 ` bug#28990: 27.0.50; thunk-delay: running expansion also requires lexical-binding Michael Heerdegen
2017-10-27 16:01   ` Nicolas Petton
2017-11-01 14:08     ` Michael Heerdegen
2017-11-01 14:48       ` Nicolas Petton

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

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

  git send-email \
    --in-reply-to=87po9be3um.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=28990@debbugs.gnu.org \
    --cc=nicolas@petton.fr \
    /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.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.