(locate-file-completion): Avoid duplicates in result.
This commit is contained in:
parent
0ce026b1d2
commit
e1cac5702d
1 changed files with 1 additions and 1 deletions
|
@ -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)))))
|
||||
|
|
Loading…
Add table
Reference in a new issue