all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: 36035@debbugs.gnu.org
Subject: bug#36035: 26.2; doc string of `add-to-list'
Date: Fri, 31 May 2019 13:46:16 -0700 (PDT)	[thread overview]
Message-ID: <556e648d-6911-40bc-815c-9e348cb7f058@default> (raw)

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''





             reply	other threads:[~2019-05-31 20:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-31 20:46 Drew Adams [this message]
2019-05-31 20:51 ` bug#36035: 26.2; doc string of `add-to-list' npostavs
2019-05-31 21:02   ` Drew Adams

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

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

  git send-email \
    --in-reply-to=556e648d-6911-40bc-815c-9e348cb7f058@default \
    --to=drew.adams@oracle.com \
    --cc=36035@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.