* Lambdas for beginners broken - help, please
@ 2024-07-24 8:43 Eduardo Ochs
2024-07-24 13:12 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-07-24 16:54 ` tpeplt
0 siblings, 2 replies; 14+ messages in thread
From: Eduardo Ochs @ 2024-07-24 8:43 UTC (permalink / raw)
To: help-gnu-emacs
Hi all,
I always present Emacs to beginners starting by Lisp, with this
approach:
http://anggtwu.net/eev-intros/find-eev-quick-intro.html#2
http://anggtwu.net/eev-intros/find-eev-quick-intro.html#3
and when I show Emacs to friends who are programmers - in some sense -
and they like it, I usually tell them to read my short tutorial on
elisp as soon as possible, and try its examples:
http://anggtwu.net/eev-intros/find-elisp-intro.html
But one or two days ago I compiled a current Emacs from git, and I saw
that many functions in eev don't work anymore. Apparently the problem
is here:
(info "(elisp)Function Cells")
https://www.gnu.org/software/emacs/manual/html_node/elisp/Function-Cells
Now the htmlized version of the manual says this,
(defun bar (n) (+ n 2))
(symbol-function 'bar)
;; -> (lambda (n) (+ n 2))
the current info manual says this,
(defun bar (n) (+ n 2))
(symbol-function 'bar)
;; -> #f(lambda (n) [t] (+ n 2))
and if I run the code myself(*) I get this:
(defun bar (n) (+ n 2))
(symbol-function 'bar)
;; -> #[(n) ((+ n 2)) nil]
I have lots of code and lots of tutorials that rely on the idea that
when lexical binding is nil then after a
(defun bar (n) (+ n 2))
the value of
(symbol-function 'bar)
will be a lambda expression in this sense,
(info "(elisp)Lambda Expressions")
http://www.gnu.org/software/emacs/manual/html_node/elisp/Lambda-Expressions
_as a list_, not as a "function object that is not a list".
What do I need to read to learn how to adapt my code to the new
behavior of Emacs?
Thanks in advance...
Eduardo Ochs
http://anggtwu.net/#eev
(*): I tried both the standard `C-x C-e' and my favorite way of
calling it, that uses the key `M-e' and `(eval <obj> t)'.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Lambdas for beginners broken - help, please
2024-07-24 8:43 Lambdas for beginners broken - help, please Eduardo Ochs
@ 2024-07-24 13:12 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-07-24 16:43 ` Eduardo Ochs
2024-07-24 16:54 ` tpeplt
1 sibling, 1 reply; 14+ messages in thread
From: Michael Heerdegen via Users list for the GNU Emacs text editor @ 2024-07-24 13:12 UTC (permalink / raw)
To: help-gnu-emacs
Eduardo Ochs <eduardoochs@gmail.com> writes:
> What do I need to read to learn how to adapt my code to the new
> behavior of Emacs?
I don't think you need to read anything, since you have already
understood everything you need to know.
I think I remember your libraries a bit.
Unfortunately you will have to change your code so that it does not call
lists as functions any more.
And - unless you redefine `backquote' - something like
`(my-cool-new-lambda ...)
with whatever tricky definition of `my-cool-new-lambda' will always
return a list and thus be not `funcall'able.
So if you need to construct lambda expressions using backquote - AFAIR
that's what your code does - it's unavoidable to add some wrapper that
`eval's the constructed lambda expression, like `eval', before you have
a valid function value.
Michael.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Lambdas for beginners broken - help, please
2024-07-24 13:12 ` Michael Heerdegen via Users list for the GNU Emacs text editor
@ 2024-07-24 16:43 ` Eduardo Ochs
2024-07-24 20:03 ` Michael Heerdegen via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 14+ messages in thread
From: Eduardo Ochs @ 2024-07-24 16:43 UTC (permalink / raw)
To: Michael Heerdegen; +Cc: help-gnu-emacs
On Wed, 24 Jul 2024 at 10:12, Michael Heerdegen via Users list for the
GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
>
> Eduardo Ochs <eduardoochs@gmail.com> writes:
>
> > What do I need to read to learn how to adapt my code to the new
> > behavior of Emacs?
>
> I don't think you need to read anything, since you have already
> understood everything you need to know.
>
> I think I remember your libraries a bit.
>
> Unfortunately you will have to change your code so that it does not call
> lists as functions any more.
>
> And - unless you redefine `backquote' - something like
>
> `(my-cool-new-lambda ...)
>
> with whatever tricky definition of `my-cool-new-lambda' will always
> return a list and thus be not `funcall'able.
>
> So if you need to construct lambda expressions using backquote - AFAIR
> that's what your code does - it's unavoidable to add some wrapper that
> `eval's the constructed lambda expression, like `eval', before you have
> a valid function value.
I don't use `(lambda ...) in eev, the problem is not that... the main
problem is that all my material for teaching Emacs to beginners says
that Emacs supports both a "traditional" Lisp, in which functions can
be lambda lists, and a "modern" Lisp, in which functions are compiled
things, and if you are a beginner who have never programmed before
then it's better to start by the "traditional" Lisp and by dynamic
binding, and only learn lexical binding after a few days...
...but I'll try to write more about that later. Let me ask a technical
question that will (probably) let me make everything in eev work with
recent Emacses.
In the version of Emacs from git that I have here -
19a18e487b8e2f0c1627b9cc98e601327e884eb2, from Tue Jul 23 21:00:23
2024 +0300 - I have this,
(eval '(lambda (n) (+ n 2)) t)
;; -> #[(n) ((+ n 2)) (t)]
(eval '(lambda (n) (+ n 2)) nil)
;; -> #[(n) ((+ n 2)) nil]
(closurep (eval '(lambda (n) (+ n 2)) t))
;; t
(closurep (eval '(lambda (n) (+ n 2)) nil))
;; t
even though the docstring for lambda still says that under dynamic
binding lambdas are self-quoting:
lambda is a Lisp macro in ‘subr.el’.
(lambda ARGS [DOCSTRING] [INTERACTIVE] BODY)
Return an anonymous function.
Under dynamic binding, a call of the form (lambda ARGS DOCSTRING
INTERACTIVE BODY) is self-quoting; the result of evaluating the
lambda expression is the expression itself. Under lexical
binding, the result is a closure. Regardless, the result is a
function, i.e., it may be stored as the function value of a
symbol, passed to ‘funcall’ or ‘mapcar’, etc.
I guess that uncompiled closures will still be supported by some
years, and maybe the plan is to make lambdas in dynamic binding return
closures that are close enough to the original lambda list...
So, question: is there a recommended way to convert the result of
(eval '(lambda (n) (+ n 2)) nil)
back to the
(lambda (n) (+ n 2))
?
Thanks in advance,
Eduardo...
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Lambdas for beginners broken - help, please
2024-07-24 8:43 Lambdas for beginners broken - help, please Eduardo Ochs
2024-07-24 13:12 ` Michael Heerdegen via Users list for the GNU Emacs text editor
@ 2024-07-24 16:54 ` tpeplt
2024-07-24 18:49 ` Michael Heerdegen via Users list for the GNU Emacs text editor
1 sibling, 1 reply; 14+ messages in thread
From: tpeplt @ 2024-07-24 16:54 UTC (permalink / raw)
To: Eduardo Ochs; +Cc: help-gnu-emacs
Eduardo Ochs <eduardoochs@gmail.com> writes:
> Hi all,
>
> I always present Emacs to beginners starting by Lisp, with this
> approach:
>
> http://anggtwu.net/eev-intros/find-eev-quick-intro.html#2
> http://anggtwu.net/eev-intros/find-eev-quick-intro.html#3
>
> and when I show Emacs to friends who are programmers - in some sense -
> and they like it, I usually tell them to read my short tutorial on
> elisp as soon as possible, and try its examples:
>
> http://anggtwu.net/eev-intros/find-elisp-intro.html
>
> But one or two days ago I compiled a current Emacs from git, and I saw
> that many functions in eev don't work anymore. Apparently the problem
> is here:
>
> (info "(elisp)Function Cells")
> https://www.gnu.org/software/emacs/manual/html_node/elisp/Function-Cells
>
> Now the htmlized version of the manual says this,
>
> (defun bar (n) (+ n 2))
> (symbol-function 'bar)
> ;; -> (lambda (n) (+ n 2))
>
> the current info manual says this,
>
> (defun bar (n) (+ n 2))
> (symbol-function 'bar)
> ;; -> #f(lambda (n) [t] (+ n 2))
>
> and if I run the code myself(*) I get this:
>
> (defun bar (n) (+ n 2))
> (symbol-function 'bar)
> ;; -> #[(n) ((+ n 2)) nil]
>
Based on what you have written, it appears that for the latest
development sources of Emacs, the documentation (the Emacs Lisp manual)
does not yet match the code. (These are the development sources so work
might simply not be complete.)
For what it’s worth, using Emacs 29.4, the evaluation does match the
documentation.
1. In a *scratch* buffer (which has ‘lexical-binding’ set to T by
default since Emacs 27):
(defun bar (n) (+ n 2))
(symbol-function 'bar)
;yields -> (closure (t) (n) (+ n 2))
This matches the behavior documented in (info "(elisp) Closures").
2. In an Emacs Lisp buffer (which has ‘lexical-binding’ set to NIL by
default and which has a mode-line ‘/d’ indicator since Emacs 28):
(defun bar (n) (+ n 2))
(symbol-function 'bar)
;yields -> (lambda (n) (+ n 2))
This matches the (soon to be out of date?) behavior documented in
(info "(elisp) Function Cells").
None of this helps with your future problem of providing examples of how
Emacs will work (the Emacs developers will need to answer that). But it
appears that you might need to have conditional explanations ("For Emacs
29 and earlier...") and ask your readers to confine their use of Emacs
to those versions that have been released so far.
--
The lyf so short, the craft so long to lerne.
- Geoffrey Chaucer, The Parliament of Birds.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Lambdas for beginners broken - help, please
2024-07-24 16:54 ` tpeplt
@ 2024-07-24 18:49 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-07-24 19:29 ` tpeplt
0 siblings, 1 reply; 14+ messages in thread
From: Michael Heerdegen via Users list for the GNU Emacs text editor @ 2024-07-24 18:49 UTC (permalink / raw)
To: help-gnu-emacs
tpeplt <tpeplt@gmail.com> writes:
> This matches the (soon to be out of date?) behavior documented in
> (info "(elisp) Function Cells").
I don't follow - what has to be changed in (info "(elisp) Function
Cells")? Stefan had updated that node along with the introduction of
the new function type.
Michael.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Lambdas for beginners broken - help, please
2024-07-24 18:49 ` Michael Heerdegen via Users list for the GNU Emacs text editor
@ 2024-07-24 19:29 ` tpeplt
2024-07-24 19:58 ` Michael Heerdegen via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 14+ messages in thread
From: tpeplt @ 2024-07-24 19:29 UTC (permalink / raw)
To: Michael Heerdegen via Users list for the GNU Emacs text editor
Cc: Michael Heerdegen
Michael Heerdegen via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:
> tpeplt <tpeplt@gmail.com> writes:
>
>> This matches the (soon to be out of date?) behavior documented in
>> (info "(elisp) Function Cells").
>
> I don't follow - what has to be changed in (info "(elisp) Function
> Cells")? Stefan had updated that node along with the introduction of
> the new function type.
>
> Michael.
>
>
I do not have a version of Emacs built from the latest development
sources, but according to the OP:
>
> the current info manual says this,
>
> (defun bar (n) (+ n 2))
> (symbol-function 'bar)
> ;; -> #f(lambda (n) [t] (+ n 2))
>
> and if I run the code myself(*) I get this:
>
> (defun bar (n) (+ n 2))
> (symbol-function 'bar)
> ;; -> #[(n) ((+ n 2)) nil]
>
If what is written by the OP correctly describes what happens with the
latest development sources, then the description in the manual:
> #f(lambda (n) [t] (+ n 2))
is not the same as what comes from evaluation:
> #[(n) ((+ n 2)) nil]
However, it was not clear (to me) that the OP was evaluating the
expressions with ‘lexical-binding’ set to T or NIL, which would affect
the evaluation result.
Also, my reply was meant to help illustrate that Emacs 29 does not show
the discrepancy between documentation and evaluation that the OP
describes. Does this make his question more appropriate for the
‘emacs-devel’ mailing list?
--
The lyf so short, the craft so long to lerne.
- Geoffrey Chaucer, The Parliament of Birds.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Lambdas for beginners broken - help, please
2024-07-24 19:29 ` tpeplt
@ 2024-07-24 19:58 ` Michael Heerdegen via Users list for the GNU Emacs text editor
0 siblings, 0 replies; 14+ messages in thread
From: Michael Heerdegen via Users list for the GNU Emacs text editor @ 2024-07-24 19:58 UTC (permalink / raw)
To: help-gnu-emacs
tpeplt <tpeplt@gmail.com> writes:
> If what is written by the OP correctly describes what happens with the
> latest development sources, then the description in the manual:
>
> > #f(lambda (n) [t] (+ n 2))
>
> is not the same as what comes from evaluation:
>
> > #[(n) ((+ n 2)) nil]
Ah, ok.
This is not about the binding mode but about which printer is used to
produce the printed representation. The built-in printer produces the
second form of output, while cl-print produces the first form. For
(defun bar (n) (+ n 2))
compare
(prin1-to-string (symbol-function 'bar))
vs.
(cl-prin1-to-string (symbol-function 'bar))
So it depends on settings or commands used. Dunno if the formats should
be unified. Maybe it would be better.
> Also, my reply was meant to help illustrate that Emacs 29 does not show
> the discrepancy between documentation and evaluation that the OP
> describes. Does this make his question more appropriate for the
> ‘emacs-devel’ mailing list?
Here is good for now I think, most involved people read this list.
Michael.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Lambdas for beginners broken - help, please
2024-07-24 16:43 ` Eduardo Ochs
@ 2024-07-24 20:03 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-07-24 22:06 ` Eduardo Ochs
2024-07-25 5:18 ` Eli Zaretskii
0 siblings, 2 replies; 14+ messages in thread
From: Michael Heerdegen via Users list for the GNU Emacs text editor @ 2024-07-24 20:03 UTC (permalink / raw)
To: help-gnu-emacs
Eduardo Ochs <eduardoochs@gmail.com> writes:
> lambda is a Lisp macro in ‘subr.el’.
>
> (lambda ARGS [DOCSTRING] [INTERACTIVE] BODY)
>
> Return an anonymous function.
> Under dynamic binding, a call of the form (lambda ARGS DOCSTRING
> INTERACTIVE BODY) is self-quoting; the result of evaluating the
> lambda expression is the expression itself.
Agreed, this is at least misleading. Stefan, Eli?
> So, question: is there a recommended way to convert the result of
>
> (eval '(lambda (n) (+ n 2)) nil)
>
> back to the
>
> (lambda (n) (+ n 2))
>
> ?
If you really think you want to do this - have a look at "cl-print.el" and
the implementation of `cl-print-object' for interpreted-function
arguments, starting around line number 240. This shows how to dissect
those objects.
Michael.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Lambdas for beginners broken - help, please
2024-07-24 20:03 ` Michael Heerdegen via Users list for the GNU Emacs text editor
@ 2024-07-24 22:06 ` Eduardo Ochs
2024-07-25 5:18 ` Eli Zaretskii
1 sibling, 0 replies; 14+ messages in thread
From: Eduardo Ochs @ 2024-07-24 22:06 UTC (permalink / raw)
To: Michael Heerdegen; +Cc: help-gnu-emacs
On Wed, 24 Jul 2024 at 17:03, Michael Heerdegen via Users list for the
GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
> Eduardo Ochs <eduardoochs@gmail.com> writes:
>
> > So, question: is there a recommended way to convert the result of
> >
> > (eval '(lambda (n) (+ n 2)) nil)
> >
> > back to the
> >
> > (lambda (n) (+ n 2))
> >
> > ?
>
> If you really think you want to do this - have a look at "cl-print.el" and
> the implementation of `cl-print-object' for interpreted-function
> arguments, starting around line number 240. This shows how to dissect
> those objects.
I fixed the problems in eev by defining these two functions
(defun ee-closure-to-lambda (c)
"Experimental!!! See the comments in the source!"
`(lambda ,(aref c 0) ,@(aref c 1)))
(defun ee-symbol-function (sym)
"Experimental!!! See the comments in the source!"
(let ((o (symbol-function sym)))
(if (closurep o)
(ee-closure-to-lambda o)
o)))
and replacing some of my calls to symbol-function to calls to
ee-symbol-function. So the situation is far less scary than I
thought... and I will replace the two hacks above by calls to
standard functions when a standard way to do that appears.
Thanks!
Eduardo
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Lambdas for beginners broken - help, please
2024-07-24 20:03 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-07-24 22:06 ` Eduardo Ochs
@ 2024-07-25 5:18 ` Eli Zaretskii
2024-07-25 9:44 ` Eduardo Ochs
1 sibling, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2024-07-25 5:18 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Wed, 24 Jul 2024 22:03:48 +0200
> From: Michael Heerdegen via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
>
> Eduardo Ochs <eduardoochs@gmail.com> writes:
>
> > lambda is a Lisp macro in ‘subr.el’.
> >
> > (lambda ARGS [DOCSTRING] [INTERACTIVE] BODY)
> >
> > Return an anonymous function.
> > Under dynamic binding, a call of the form (lambda ARGS DOCSTRING
> > INTERACTIVE BODY) is self-quoting; the result of evaluating the
> > lambda expression is the expression itself.
>
> Agreed, this is at least misleading. Stefan, Eli?
What is misleading?
I admit that I don't have a clear understanding of the issue: I don't
understand what Eduardo wants to do in the first place, nor which
version of Emacs broke what he did or why. So maybe wait for Stefan
to chime in.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Lambdas for beginners broken - help, please
2024-07-25 5:18 ` Eli Zaretskii
@ 2024-07-25 9:44 ` Eduardo Ochs
2024-07-25 11:33 ` Eli Zaretskii
0 siblings, 1 reply; 14+ messages in thread
From: Eduardo Ochs @ 2024-07-25 9:44 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
On Thu, 25 Jul 2024 at 02:19, Eli Zaretskii <eliz@gnu.org> wrote:
>
> > Date: Wed, 24 Jul 2024 22:03:48 +0200
> > From: Michael Heerdegen via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
> >
> > Agreed, this is at least misleading. Stefan, Eli?
>
> What is misleading?
>
> I admit that I don't have a clear understanding of the issue: I don't
> understand what Eduardo wants to do in the first place, nor which
> version of Emacs broke what he did or why. So maybe wait for Stefan
> to chime in.
Hi Eli,
lambda used to be:
self-quoting in dynamic binding,
non-self-quoting in lexical binding.
Now lambda is:
non-self-quoting in dynamic binding,
non-self-quoting in lexical binding.
So its docstring needs to be updated.
Cheers,
Eduardo
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Lambdas for beginners broken - help, please
2024-07-25 9:44 ` Eduardo Ochs
@ 2024-07-25 11:33 ` Eli Zaretskii
2024-07-25 12:49 ` Eduardo Ochs
0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2024-07-25 11:33 UTC (permalink / raw)
To: help-gnu-emacs
> From: Eduardo Ochs <eduardoochs@gmail.com>
> Date: Thu, 25 Jul 2024 06:44:27 -0300
> Cc: help-gnu-emacs@gnu.org
>
> On Thu, 25 Jul 2024 at 02:19, Eli Zaretskii <eliz@gnu.org> wrote:
> >
> > > Date: Wed, 24 Jul 2024 22:03:48 +0200
> > > From: Michael Heerdegen via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
> > >
> > > Agreed, this is at least misleading. Stefan, Eli?
> >
> > What is misleading?
> >
> > I admit that I don't have a clear understanding of the issue: I don't
> > understand what Eduardo wants to do in the first place, nor which
> > version of Emacs broke what he did or why. So maybe wait for Stefan
> > to chime in.
>
> Hi Eli,
>
> lambda used to be:
>
> self-quoting in dynamic binding,
> non-self-quoting in lexical binding.
>
> Now lambda is:
>
> non-self-quoting in dynamic binding,
> non-self-quoting in lexical binding.
>
> So its docstring needs to be updated.
What is "now"? which version of Emacs is that?
And how is the current doc string misleading or unclear?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Lambdas for beginners broken - help, please
2024-07-25 11:33 ` Eli Zaretskii
@ 2024-07-25 12:49 ` Eduardo Ochs
2024-07-25 14:53 ` Eli Zaretskii
0 siblings, 1 reply; 14+ messages in thread
From: Eduardo Ochs @ 2024-07-25 12:49 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
On Thu, 25 Jul 2024 at 08:34, Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Eduardo Ochs <eduardoochs@gmail.com>
> > Date: Thu, 25 Jul 2024 06:44:27 -0300
> > Cc: help-gnu-emacs@gnu.org
> >
> > On Thu, 25 Jul 2024 at 02:19, Eli Zaretskii <eliz@gnu.org> wrote:
> > >
> > > > Date: Wed, 24 Jul 2024 22:03:48 +0200
> > > > From: Michael Heerdegen via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
> > > >
> > > > Agreed, this is at least misleading. Stefan, Eli?
> > >
> > > What is misleading?
> > >
> > > I admit that I don't have a clear understanding of the issue: I don't
> > > understand what Eduardo wants to do in the first place, nor which
> > > version of Emacs broke what he did or why. So maybe wait for Stefan
> > > to chime in.
> >
> > Hi Eli,
> >
> > lambda used to be:
> >
> > self-quoting in dynamic binding,
> > non-self-quoting in lexical binding.
> >
> > Now lambda is:
> >
> > non-self-quoting in dynamic binding,
> > non-self-quoting in lexical binding.
> >
> > So its docstring needs to be updated.
>
> What is "now"? which version of Emacs is that?
>
> And how is the current doc string misleading or unclear?
Hi Eli,
"now" is d2cb9f2bf6ef9f3fcd8c21455ca1f1e624e61bf4, dated Thu Jul 25
13:38:27 2024 +0200, pulled and compiled a few minutes ago.
The docstring for lambda says
Return an anonymous function.
Under dynamic binding, a call of the form (lambda ARGS DOCSTRING
INTERACTIVE BODY) is self-quoting; the result of evaluating the
lambda expression is the expression itself. Under lexical
binding, the result is a closure. Regardless, the result is a
function, i.e., it may be stored as the function value of a
symbol, passed to ‘funcall’ or ‘mapcar’, etc.
and the sentence
Under dynamic binding, a call of the form (lambda ARGS DOCSTRING
INTERACTIVE BODY) is self-quoting; the result of evaluating the
lambda expression is the expression itself.
is no longer true.
Cheers,
Eduardo
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Lambdas for beginners broken - help, please
2024-07-25 12:49 ` Eduardo Ochs
@ 2024-07-25 14:53 ` Eli Zaretskii
0 siblings, 0 replies; 14+ messages in thread
From: Eli Zaretskii @ 2024-07-25 14:53 UTC (permalink / raw)
To: help-gnu-emacs
> From: Eduardo Ochs <eduardoochs@gmail.com>
> Date: Thu, 25 Jul 2024 09:49:46 -0300
> Cc: help-gnu-emacs@gnu.org
>
> "now" is d2cb9f2bf6ef9f3fcd8c21455ca1f1e624e61bf4, dated Thu Jul 25
> 13:38:27 2024 +0200, pulled and compiled a few minutes ago.
So this is Emacs 31?
> The docstring for lambda says
>
> Return an anonymous function.
> Under dynamic binding, a call of the form (lambda ARGS DOCSTRING
> INTERACTIVE BODY) is self-quoting; the result of evaluating the
> lambda expression is the expression itself. Under lexical
> binding, the result is a closure. Regardless, the result is a
> function, i.e., it may be stored as the function value of a
> symbol, passed to ‘funcall’ or ‘mapcar’, etc.
>
> and the sentence
>
> Under dynamic binding, a call of the form (lambda ARGS DOCSTRING
> INTERACTIVE BODY) is self-quoting; the result of evaluating the
> lambda expression is the expression itself.
>
> is no longer true.
Thanks. I hope Stefan or someone else will explain how to correct the
doc string.
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2024-07-25 14:53 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-24 8:43 Lambdas for beginners broken - help, please Eduardo Ochs
2024-07-24 13:12 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-07-24 16:43 ` Eduardo Ochs
2024-07-24 20:03 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-07-24 22:06 ` Eduardo Ochs
2024-07-25 5:18 ` Eli Zaretskii
2024-07-25 9:44 ` Eduardo Ochs
2024-07-25 11:33 ` Eli Zaretskii
2024-07-25 12:49 ` Eduardo Ochs
2024-07-25 14:53 ` Eli Zaretskii
2024-07-24 16:54 ` tpeplt
2024-07-24 18:49 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-07-24 19:29 ` tpeplt
2024-07-24 19:58 ` Michael Heerdegen via Users list for the GNU Emacs text editor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).