From d49458c44a37319aec259e3f5197e006bf613610 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 2 Aug 1993 23:04:05 +0000 Subject: [PATCH] (comint-dynamic-complete): Expand PATHDIR in call to file-name-completion. --- lisp/comint.el | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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)) -- 2.39.5