1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-25 07:28:20 +00:00

(comint-dynamic-complete): Expand PATHDIR in call to file-name-completion.

This commit is contained in:
Roland McGrath 1993-08-02 23:04:05 +00:00
parent 5065f906dc
commit d49458c44a

View File

@ -1184,8 +1184,15 @@ it just adds completion characters to the end of the filename."
(let* ((pathname (comint-match-partial-pathname))
(pathdir (file-name-directory pathname))
(pathnondir (file-name-nondirectory pathname))
(completion (file-name-completion pathnondir
(or pathdir default-directory))))
(completion (file-name-completion
pathnondir
;; It is important to expand PATHDIR because
;; default-directory might be a handled name, and the
;; unexpanded PATHDIR won't necessarily match the
;; handler regexp.
(if pathdir
(expand-file-name pathdir)
default-directory))))
(cond ((null completion)
(message "No completions of %s" pathname)
(ding))