Re: master ed2063ba72d 1/8: Allow writing a lambda function as a command in Eshell

Jim Porter <[email protected]>
Newsgroups gmane.emacs.devel
Message-ID <[email protected]>
On 8/19/2026 6:18 AM, Stefan Monnier wrote:
>> +(ert-deftest esh-cmd-test/literal-lambda ()
>> +  "Test that a lambda isn't immediately invoked."
>> +  (eshell-command-result-equal "(lambda (i) (+ i 1))"
>> +                               (eval '(lambda (i) (+ i 1)))))
> 
> BTW, this `eval` is using the deprecated dynbound variant of ELisp.
> Eshell should move to the lexbound variant, where
> 
>      (eshell-command-result-equal "(lambda (i) (+ i 1))"
>                                   (eval '(lambda (i) (+ i 1)) t))

Yeah, this is on the todo list. There are a lot of dynbound 'eval's 
peppered through the Eshell source that will need updates. Moving to 
lexbound Eshell will probably look something like how we've been 
(slowly) moving to lexbound Elisp. Adding something like this is 
probably the way forward:

   (defcustom eshell-lexical-binding lexical-binding)

Now that Eshell has Lisp pipelines and my stack of patches isn't so 
tall, this should be relatively straightforward to fix.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.