From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Cc: Mark Oteiza <mvoteiza@udel.edu>
Subject: Re: [Emacs-diffs] master 4ffdcfc: Nudge WoMan toward lexical-binding
Date: Thu, 25 Aug 2016 00:48:18 -0400 [thread overview]
Message-ID: <jwvlgzlfod5.fsf-monnier+emacsdiffs@gnu.org> (raw)
In-Reply-To: <20160810042245.914B52201C2@vcs.savannah.gnu.org> (Mark Oteiza's message of "Wed, 10 Aug 2016 04:22:45 +0000 (UTC)")
> - (add-to-list 'manpath
> - (if (match-beginning 1)
> - (match-string 1)
> - (cons (match-string 2)
> - (match-string 3)))))
> + (cl-pushnew (if (match-beginning 1)
> + (match-string 1)
> + (cons (match-string 2)
> + (match-string 3)))
> + manpath))
cl-pushnew uses `eql` (contrary to add-to-list which uses `equal`) for
equality testing. So when applied to value that have just been
constructed by `cons` and `match-string`, it will do exactly the same as
`push` would.
IOW I think you need to add
:test #'equal
as arg to many of those cl-pushnew you introduced. Note that in my
experience there are also some `add-to-list`s which don't actually care
about equality testing at all and can just be replaced by a simple
`push`.
Stefan
next parent reply other threads:[~2016-08-25 4:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20160810042245.19283.98654@vcs.savannah.gnu.org>
[not found] ` <20160810042245.914B52201C2@vcs.savannah.gnu.org>
2016-08-25 4:48 ` Stefan Monnier [this message]
2016-09-27 17:43 ` [Emacs-diffs] master 4ffdcfc: Nudge WoMan toward lexical-binding Mark Oteiza
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvlgzlfod5.fsf-monnier+emacsdiffs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=mvoteiza@udel.edu \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).