Commit e1cac570 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(locate-file-completion): Avoid duplicates in result.

parent 0ce026b1
......@@ -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)))))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment