|
From: | Eric Abrahamsen |
Subject: | Re: How do I pass a variable defined in a wrapping let, to a lambda? |
Date: | Fri, 11 Mar 2022 16:52:44 -0800 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> writes: > Eric Abrahamsen wrote: > >> Oh, maybe I'm wrong. I just tested some code in two >> different elisp buffers, one with lexical-binding -> t and >> one with it nil, and it worked in both cases. >> >> (defun steinars-test (file) >> (let ((fname (expand-file-name file))) >> (lambda () (message "file is %s" fname)))) >> >> (setq payload (steinars-test "~/.emacs.d/init.el")) >> >> (funcall payload) > > This doesn't work with dynamic/special binding for me ... Oh, but that's good -- it's not supposed to work with dynamic binding! I might have just messed something up while testing.
[Prev in Thread] | Current Thread | [Next in Thread] |