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

Drew Adams <drew.adams@oracle.com> writes:

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

Have you mixed up add-to-list with some hypothetical add-to-alist?

(setq foo '((a . "aaa") (b . "bbb"))) ; => ((a . "aaa") (b . "bbb"))

(add-to-list 'foo '(a . "aaa")) ; => ((a . "aaa") (b . "bbb"))





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

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-31 20:46 bug#36035: 26.2; doc string of `add-to-list' Drew Adams
2019-05-31 20:51 ` npostavs [this message]
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=855zpqcpqh.fsf@gmail.com \
    --to=npostavs@gmail.com \
    --cc=36035@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /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.