From: Roland McGrath Date: Mon, 2 Aug 1993 23:04:05 +0000 (+0000) Subject: (comint-dynamic-complete): Expand PATHDIR in call to file-name-completion. X-Git-Tag: emacs-19.34~11424 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d49458c44a37319aec259e3f5197e006bf613610;p=emacs.git (comint-dynamic-complete): Expand PATHDIR in call to file-name-completion. --- diff --git a/lisp/comint.el b/lisp/comint.el index 44f09685661..cfa8f61db88 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -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))