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

Stefan Monnier <[email protected]>
Newsgroups gmane.emacs.devel
Message-ID <[email protected]>
> +(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))


=== Stefan
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.