From: Chong Yidong <cyd@gnu.org>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: 12705-done@debbugs.gnu.org
Subject: bug#12705: 24.2.50; `Info-complete-menu-item' should use `add-to-list', not `push', to prevent duplicates
Date: Mon, 29 Oct 2012 18:44:36 +0800 [thread overview]
Message-ID: <87fw4xd0bv.fsf@gnu.org> (raw)
In-Reply-To: <DC6CE9438CDC4327B4C288B0FFE14DF2@us.oracle.com> (Drew Adams's message of "Mon, 22 Oct 2012 09:25:56 -0700")
"Drew Adams" <drew.adams@oracle.com> writes:
> This sexp:
> (push (match-string-no-properties 1) completions)
>
> should be changed to this:
> (add-to-list 'completions (match-string-no-properties 1))
>
> Otherwise the same entry can be added to `completions' multiple times.
>
> This might not be manifested in *Completions*, because Emacs removes
> duplicate candidates. But in other completion setups (e.g. Icicles)
> duplicate candidates (e.g. same display string, but perhaps different
> alist elements) are sometimes allowed.
Sounds reasonable. Done in trunk, using delete-dups instead of
add-to-list (in case info.el switches to lexical binding).
next prev parent reply other threads:[~2012-10-29 10:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-22 16:25 bug#12705: 24.2.50; `Info-complete-menu-item' should use `add-to-list', not `push', to prevent duplicates Drew Adams
2012-10-29 10:44 ` Chong Yidong [this message]
2012-10-29 15:37 ` Drew Adams
2012-10-29 16:49 ` Stefan Monnier
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=87fw4xd0bv.fsf@gnu.org \
--to=cyd@gnu.org \
--cc=12705-done@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.