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
commit50b13be0a9bb7fe8a814b45886ff70d5f9464f31 (patch)
treea69351baec4d5e2ae90ff241cfe04166bbcab6c8 /lisp/complete.el
parent4fe4804bcb60d13fe5c6dc2ee6d590dbf031719c (diff)
downloademacs-50b13be0a9bb7fe8a814b45886ff70d5f9464f31.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