GNU bug report logs -
#36035
26.2; doc string of `add-to-list'
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Fri, 31 May 2019 20:47:02 UTC
Severity: minor
Found in version 26.2
Done: Drew Adams <drew.adams <at> oracle.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
The doc in (elisp) `List Variables' is OK. The doc string is not.
The doc string says this:
Add ELEMENT to the value of LIST-VAR if it isn't there yet.
That doesn't say what it does it ELEMENT _is_ already there (and it
should).
But one might easily get the impression that it does NOT add ELEMENT if
it is already present. And that's just plain wrong.
(setq foo '((a . "aaa") (b . "bbb"))) ; => ((a . "aaa") (b . "bbb"))
(add-to-list 'foo '(a . "@@@@")) ; => ((a . "@@@@") (a . "aaa") (b . "bbb"))
In GNU Emacs 26.2 (build 1, x86_64-w64-mingw32)
of 2019-04-13
Repository revision: fd1b34bfba8f3f6298df47c8e10b61530426f749
Windowing system distributor `Microsoft Corp.', version 10.0.17134
Configured using:
`configure --without-dbus --host=x86_64-w64-mingw32
--without-compress-install 'CFLAGS=-O2 -static -g3''
This bug report was last modified 5 years and 355 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.