changeset 10830:a774e92de39c

Let file-name-handler-alist to nil in comint-dynamic-complete-as-filename and comint-dynamic-list-filename-completions.
author Simon Marshall <simon@gnu.org>
date Sat, 25 Feb 1995 15:22:57 +0000
parents 135ef978d711
children 94811e4b2a06
files lisp/comint.el
diffstat 1 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/comint.el	Sat Feb 25 07:49:39 1995 +0000
+++ b/lisp/comint.el	Sat Feb 25 15:22:57 1995 +0000
@@ -1866,7 +1866,7 @@
 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 @@
 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 @@
                     ;; 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 @@
   "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))