summaryrefslogtreecommitdiff
path: root/lisp/complete.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>1999-08-09 08:56:31 +0000
committerEli Zaretskii <eliz@gnu.org>1999-08-09 08:56:31 +0000
commitb38d1cc78ed57ed1b89c349d2af3a20583b5fadf (patch)
tree93b5bf4bbe3908ab3e8fcdbeca8ab9aaf092fa8d /lisp/complete.el
parent1076254d8344645775b45eefdd16dddf2863179e (diff)
downloademacs-b38d1cc78ed57ed1b89c349d2af3a20583b5fadf.tar.gz
(PC-do-completion): If completing on file name,
reproduce str by concatenating its directory and basename parts.
Diffstat (limited to 'lisp/complete.el')
-rw-r--r--lisp/complete.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/complete.el b/lisp/complete.el
index 6b5cc3d5900..c755f725c57 100644
--- a/lisp/complete.el
+++ b/lisp/complete.el
@@ -446,7 +446,11 @@ of `minibuffer-completion-table' and the minibuffer contents.")
(setq basestr (substring str incname)
dirname (substring str 0 incname))
(setq basestr (file-name-nondirectory str)
- dirname (file-name-directory str)))
+ dirname (file-name-directory str))
+ ;; Make sure str is consistent with its directory and basename
+ ;; parts. This is important on DOZe'NT systems when str only
+ ;; includes a drive letter, like in "d:".
+ (setq str (concat dirname basestr)))
(setq basestr str))
;; Convert search pattern to a standard regular expression