aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland McGrath1993-08-02 23:04:05 +0000
committerRoland McGrath1993-08-02 23:04:05 +0000
commitd49458c44a37319aec259e3f5197e006bf613610 (patch)
tree475539769e7f718e7c1f31ed689aabc913b965cd
parent5065f906dcd972f83ee26b34ca9124f933f1da02 (diff)
downloademacs-d49458c44a37319aec259e3f5197e006bf613610.tar.gz
emacs-d49458c44a37319aec259e3f5197e006bf613610.zip
(comint-dynamic-complete): Expand PATHDIR in call to file-name-completion.
-rw-r--r--lisp/comint.el11
1 files 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."
1184 (let* ((pathname (comint-match-partial-pathname)) 1184 (let* ((pathname (comint-match-partial-pathname))
1185 (pathdir (file-name-directory pathname)) 1185 (pathdir (file-name-directory pathname))
1186 (pathnondir (file-name-nondirectory pathname)) 1186 (pathnondir (file-name-nondirectory pathname))
1187 (completion (file-name-completion pathnondir 1187 (completion (file-name-completion
1188 (or pathdir default-directory)))) 1188 pathnondir
1189 ;; It is important to expand PATHDIR because
1190 ;; default-directory might be a handled name, and the
1191 ;; unexpanded PATHDIR won't necessarily match the
1192 ;; handler regexp.
1193 (if pathdir
1194 (expand-file-name pathdir)
1195 default-directory))))
1189 (cond ((null completion) 1196 (cond ((null completion)
1190 (message "No completions of %s" pathname) 1197 (message "No completions of %s" pathname)
1191 (ding)) 1198 (ding))