# HG changeset patch # User Roland McGrath # Date 744332645 0 # Node ID 4d19c2b7b6e1a8aa0f932d49f4c638f194a61b26 # Parent fe5912b3526ae49b3964748028d6e532d5e43762 (comint-dynamic-complete): Expand PATHDIR in call to file-name-completion. diff -r fe5912b3526a -r 4d19c2b7b6e1 lisp/comint.el --- a/lisp/comint.el Mon Aug 02 22:56:58 1993 +0000 +++ b/lisp/comint.el Mon Aug 02 23:04:05 1993 +0000 @@ -1184,8 +1184,15 @@ (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))