summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2006-07-12 15:57:07 +0000
committerRichard M. Stallman <rms@gnu.org>2006-07-12 15:57:07 +0000
commite1cac5702da02e7c856d6d14a043e1b6554ce585 (patch)
tree8cdc653fea5e7194b7849e1f539a1cc2453bfc6c /lisp
parent0ce026b1d2cb332b6fbc377b6a218a15a5b3ae16 (diff)
downloademacs-e1cac5702da02e7c856d6d14a043e1b6554ce585.tar.gz
(locate-file-completion): Avoid duplicates in result.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/files.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 90ca58a7511..af8e3d0e889 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -691,7 +691,7 @@ PATH-AND-SUFFIXES is a pair of lists, (DIRECTORIES . SUFFIXES)."
(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)))))