GNU bug report logs - #25292
Ambiguity in doc string of defvar

Previous Next

Package: emacs;

Reported by: Alan Mackenzie <acm <at> muc.de>

Date: Thu, 29 Dec 2016 18:20:01 UTC

Severity: minor

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 25292 <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 25292 <at> debbugs.gnu.org
Subject: Re: bug#25292: Ambiguity in doc string of defvar
Date: Thu, 29 Dec 2016 19:42:38 +0000
Hello, Eli.

On Thu, Dec 29, 2016 at 08:29:15PM +0200, Eli Zaretskii wrote:
> > Date: Thu, 29 Dec 2016 18:18:38 +0000
> > From: Alan Mackenzie <acm <at> muc.de>

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

> That "it" is ambiguous.  By default, people tend to interpret "it" as
> referring to the last noun before it, but that's not what you mean in
> this case.

Yes, it's no better than what I was complaining about.  :-(

> And after all that, are you sure INITVALUE is always evaluated?

I've had a look at eval.c.  INITVALUE is evaluated only when it's going
to be used.

So, maybe the whole paragraph should look like this:

    If SYMBOL's value is void and the optional argument INITVALUE is
    provided, INITVALUE is evaluated and the result used to set SYMBOL.
    If SYMBOL is buffer-local, its default value is what is set;
    buffer-local values are not affected.  If INITVALUE is missing,
    SYMBOL's value is not set.
 
What do you think?

-- 
Alan Mackenzie (Nuremberg, Germany).




This bug report was last modified 8 years and 196 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.