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

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

Re: How do I pass a variable defined in a wrapping let, to a lambda?


From: Emanuel Berg
Subject: Re: How do I pass a variable defined in a wrapping let, to a lambda?
Date: Sat, 12 Mar 2022 02:00:45 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Eric Abrahamsen wrote:

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

Still, didn't the OP use the "cookie" line as you called it?

;;; restclient-jq.el --- Support for setting restclient vars from jq 
expressions -*- lexical-binding: t; -*-                                      

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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