unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: 25292@debbugs.gnu.org
Subject: bug#25292: Ambiguity in doc string of defvar
Date: Thu, 29 Dec 2016 18:18:38 +0000	[thread overview]
Message-ID: <20161229181838.GB2531@acm.fritz.box> (raw)

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





             reply	other threads:[~2016-12-29 18:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-29 18:18 Alan Mackenzie [this message]
2016-12-29 18:29 ` bug#25292: Ambiguity in doc string of defvar 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161229181838.GB2531@acm.fritz.box \
    --to=acm@muc.de \
    --cc=25292@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).