Subject: Re: bug#12705: 24.2.50; `Info-complete-menu-item' should use `add-to-list', not `push', to prevent duplicates

From: Chong Yidong <[email-masked]>
Date: Mon, 29 Oct 2012 18:44:36 +0800

"Drew Adams" <[email-masked]> 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).