]> code.delx.au - gnu-emacs/commitdiff
Let file-name-handler-alist to nil in comint-dynamic-complete-as-filename and
authorSimon Marshall <simon@gnu.org>
Sat, 25 Feb 1995 15:22:57 +0000 (15:22 +0000)
committerSimon Marshall <simon@gnu.org>
Sat, 25 Feb 1995 15:22:57 +0000 (15:22 +0000)
comint-dynamic-list-filename-completions.

lisp/comint.el

index 880578c4de607ded39a7c7eee0e1bf63c013d65a..045988e8c0ac5dfe64b56da73ab03c0a0f28122c 100644 (file)
@@ -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))