unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#25292: Ambiguity in doc string of defvar
@ 2016-12-29 18:18 Alan Mackenzie
  2016-12-29 18:29 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Alan Mackenzie @ 2016-12-29 18:18 UTC (permalink / raw)
  To: 25292

Hello, Emacs.

The doc string for defvar includes this bit:

    The optional argument INITVALUE is evaluated, and used to set
    SYMBOL, only if SYMBOL's value is void.

Supposing SYMBOL's value is bound.  Clearly it does not get set to
INITVALUE.  But in this case is INITVALUE evaluated (and the result
discarded) or not?  The text leaves this ambiguous.  An improvement
would be the appropriate one of the following:

    If SYMBOL's value is void, the optional argument INITVALUE is
    evaluated and used to set SYMBOL.

    INITVALUE is evaluated, and if SYMBOL's value is void, it is used to
    set SYMBOL.

-- 
Alan Mackenzie (Nuremberg, Germany).





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-12-30  9:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-29 18:18 bug#25292: Ambiguity in doc string of defvar Alan Mackenzie
2016-12-29 18:29 ` Eli Zaretskii
2016-12-29 19:42   ` Alan Mackenzie
2016-12-29 20:35     ` Eli Zaretskii
2016-12-29 20:57       ` Alan Mackenzie
2016-12-30  7:46         ` Eli Zaretskii
2016-12-30  9:02           ` Alan Mackenzie
2016-12-30  9:42             ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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