diff options
| author | Richard M. Stallman | 2006-07-12 15:57:07 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2006-07-12 15:57:07 +0000 |
| commit | e1cac5702da02e7c856d6d14a043e1b6554ce585 (patch) | |
| tree | 8cdc653fea5e7194b7849e1f539a1cc2453bfc6c | |
| parent | 0ce026b1d2cb332b6fbc377b6a218a15a5b3ae16 (diff) | |
| download | emacs-e1cac5702da02e7c856d6d14a043e1b6554ce585.tar.gz emacs-e1cac5702da02e7c856d6d14a043e1b6554ce585.zip | |
(locate-file-completion): Avoid duplicates in result.
| -rw-r--r-- | lisp/files.el | 2 |
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)." | |||
| 691 | (when (file-directory-p dir) | 691 | (when (file-directory-p dir) |
| 692 | (dolist (file (file-name-all-completions | 692 | (dolist (file (file-name-all-completions |
| 693 | (file-name-nondirectory string) dir)) | 693 | (file-name-nondirectory string) dir)) |
| 694 | (push (if string-dir (concat string-dir file) file) names) | 694 | (add-to-list 'names (if string-dir (concat string-dir file) file)) |
| 695 | (when (string-match suffix file) | 695 | (when (string-match suffix file) |
| 696 | (setq file (substring file 0 (match-beginning 0))) | 696 | (setq file (substring file 0 (match-beginning 0))) |
| 697 | (push (if string-dir (concat string-dir file) file) names))))) | 697 | (push (if string-dir (concat string-dir file) file) names))))) |