changeset 4427:4d19c2b7b6e1

(comint-dynamic-complete): Expand PATHDIR in call to file-name-completion.
author Roland McGrath <roland@gnu.org>
date Mon, 02 Aug 1993 23:04:05 +0000
parents fe5912b3526a
children b95bd397d6b7
files lisp/comint.el
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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))