summaryrefslogtreecommitdiff
path: root/lisp/comint.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/comint.el')
-rw-r--r--lisp/comint.el16
1 files changed, 9 insertions, 7 deletions
diff --git a/lisp/comint.el b/lisp/comint.el
index 880578c4de6..045988e8c0a 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -1866,7 +1866,7 @@ completions listing is dependent on the value of `comint-completion-autolist'.
Returns t if successful."
(interactive)
(if (comint-match-partial-filename)
- (prog2 (or (eq (selected-window) (minibuffer-window))
+ (prog2 (or (window-minibuffer-p (selected-window))
(message "Completing file name..."))
(comint-dynamic-complete-as-filename))))
@@ -1876,19 +1876,20 @@ Returns t if successful."
See `comint-dynamic-complete-filename'. Returns t if successful."
(let* ((completion-ignore-case nil)
(completion-ignored-extensions comint-completion-fignore)
+ (file-name-handler-alist nil)
+ (minibuffer-p (window-minibuffer-p (selected-window)))
(success t)
(filename (or (comint-match-partial-filename) ""))
(pathdir (file-name-directory filename))
(pathnondir (file-name-nondirectory filename))
(directory (if pathdir (comint-directory pathdir) default-directory))
- (completion (file-name-completion pathnondir directory))
- (mini-flag (eq (selected-window) (minibuffer-window))))
+ (completion (file-name-completion pathnondir directory)))
(cond ((null completion)
(message "No completions of %s" filename)
(setq success nil))
((eq completion t) ; Means already completed "file".
(if comint-completion-addsuffix (insert " "))
- (or mini-flag (message "Sole completion")))
+ (or minibuffer-p (message "Sole completion")))
((string-equal completion "") ; Means completion on "directory/".
(comint-dynamic-list-filename-completions))
(t ; Completion string returned.
@@ -1899,19 +1900,19 @@ See `comint-dynamic-complete-filename'. Returns t if successful."
;; We inserted a unique completion.
(if comint-completion-addsuffix
(insert (if (file-directory-p file) "/" " ")))
- (or mini-flag (message "Completed")))
+ (or minibuffer-p (message "Completed")))
((and comint-completion-recexact comint-completion-addsuffix
(string-equal pathnondir completion)
(file-exists-p file))
;; It's not unique, but user wants shortest match.
(insert (if (file-directory-p file) "/" " "))
- (or mini-flag (message "Completed shortest")))
+ (or minibuffer-p (message "Completed shortest")))
((or comint-completion-autolist
(string-equal pathnondir completion))
;; It's not unique, list possible completions.
(comint-dynamic-list-filename-completions))
(t
- (or mini-flag (message "Partially completed")))))))
+ (or minibuffer-p (message "Partially completed")))))))
success))
@@ -1980,6 +1981,7 @@ See also `comint-dynamic-complete-filename'."
"List in help buffer possible completions of the filename at point."
(interactive)
(let* ((completion-ignore-case nil)
+ (file-name-handler-alist nil)
(filename (or (comint-match-partial-filename) ""))
(pathdir (file-name-directory filename))
(pathnondir (file-name-nondirectory filename))