emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#22192: closed (Doc string of macroexp-let2 is obsc


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#22192: closed (Doc string of macroexp-let2 is obscure.)
Date: Thu, 17 Dec 2015 13:13:02 +0000

Your message dated Thu, 17 Dec 2015 13:14:26 +0000
with message-id <address@hidden>
and subject line Re: bug#22192: Doc string of macroexp-let2 is obscure.
has caused the debbugs.gnu.org bug report #22192,
regarding Doc string of macroexp-let2 is obscure.
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
22192: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22192
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: Doc string of macroexp-let2 is obscure. Date: Thu, 17 Dec 2015 10:09:36 +0000 User-agent: Mutt/1.5.23 (2014-03-12)
Hello, Emacs.

The complete doc string of macroexp-let2 is

    "Bind VAR to a copyable expression that returns the value of EXP.
    This is like `(let ((v ,EXP)) ,EXPS) except that `v' is a new generated
    symbol which EXPS can find in VAR.
    TEST should be the name of a predicate on EXP checking whether the `let' can
    be skipped; if nil, as is usual, `macroexp-const-p' is used."

This macro is widely used (over 50 times) in Emacs, and is not
documented in the Elisp manual.  The doc string is difficult to
understand.

What is "Bind VAR to a copyable expression that returns the value of
EXP." supposed to mean?  What is a "copyable expression"?  Surely all
expressions can be copied?

How does this expression "return the value of EXP"?  Surely functions
return values, not expressions?

What is the "value of EXP" that is being returned?  Does "value of EXP"
just mean "EXP", here?  What is the purpose of it being returned?

"This is like `(let ((v ,EXP)) ,EXPS)' except that `v' is a new
generated symbol which EXPS can find in VAR.": The first part of this
sentence is quite clear, but "which ,EXPS can find in VAR." is puzzling.
How, precisely, do the ,EXPS "find" v in VAR?

"TEST should be the name of a predicate on EXP checking whether the
`let' can be skipped ...": why "the name of a predicate", and not simply
"a predicate"?  Surely the presence of this test makes a word like
"maybe" necessary in the first line of the doc string?

What happens to the generated code when "the `let' is skipped"?  In this
case, can v, or VAR, still be used by the ,EXPS?

Above all, what is the purpose of this macro?  What does it achieve?

-- 
Alan Mackenzie (Nuremberg, Germany).



--- End Message ---
--- Begin Message --- Subject: Re: bug#22192: Doc string of macroexp-let2 is obscure. Date: Thu, 17 Dec 2015 13:14:26 +0000 User-agent: Mutt/1.5.23 (2014-03-12)
Hello, Nicolas.

On Thu, Dec 17, 2015 at 01:29:36PM +0100, Nicolas Richard wrote:
> Alan Mackenzie <address@hidden> writes:
> >     "Bind VAR to a copyable expression that returns the value of EXP.
> >     This is like `(let ((v ,EXP)) ,EXPS) except that `v' is a new generated
> >     symbol which EXPS can find in VAR.
> >     TEST should be the name of a predicate on EXP checking whether the 
> > `let' can
> >     be skipped; if nil, as is usual, `macroexp-const-p' is used."

> > This macro is widely used (over 50 times) in Emacs, and is not
> > documented in the Elisp manual.  The doc string is difficult to
> > understand.

> I agree that the docstring was pretty obscure, but it was modified
> in commit 5e3fde03b45877d3e30f859a14c10043e637aa63 

Yes, I was looking at the 24.5 version.  Thanks for the reply, and sorry
for wasting your time.  I will close the bug.

> It now is :

[ .... ]

That looks fine!

> -- 
> Nicolas

-- 
Alan Mackenzie (Nuremberg, Germany).


--- End Message ---

reply via email to

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