Mercurial > emacs
changeset 71848:067fc0d0be7e
(locate-file-completion): Avoid duplicates in result.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 12 Jul 2006 15:57:07 +0000 |
parents | 61f3d6be1e92 |
children | 2227a7e3b7eb |
files | lisp/files.el |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/files.el Wed Jul 12 15:56:33 2006 +0000 +++ b/lisp/files.el Wed Jul 12 15:57:07 2006 +0000 @@ -691,7 +691,7 @@ (when (file-directory-p dir) (dolist (file (file-name-all-completions (file-name-nondirectory string) dir)) - (push (if string-dir (concat string-dir file) file) names) + (add-to-list 'names (if string-dir (concat string-dir file) file)) (when (string-match suffix file) (setq file (substring file 0 (match-beginning 0))) (push (if string-dir (concat string-dir file) file) names)))))