|
From: | npostavs |
Subject: | bug#36035: 26.2; doc string of `add-to-list' |
Date: | Fri, 31 May 2019 16:51:02 -0400 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/26.1.92 (windows-nt) |
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"))
[Prev in Thread] | Current Thread | [Next in Thread] |