|
From: | Chong Yidong |
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 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) |
"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).
[Prev in Thread] | Current Thread | [Next in Thread] |