aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-06-02 16:29:05 +0000
committerRichard M. Stallman1994-06-02 16:29:05 +0000
commit22f33dd9d2e0aa95231fb3d8409a1d26ed6b067d (patch)
tree215ae3defbd4a33a30584a90c0f37ad4be23a962
parente9e00ff2eab77acd4d4546c504ba164e87ffa63a (diff)
downloademacs-22f33dd9d2e0aa95231fb3d8409a1d26ed6b067d.tar.gz
emacs-22f33dd9d2e0aa95231fb3d8409a1d26ed6b067d.zip
(comint-dynamic-complete-as-filename)
(comint-dynamic-complete-filename): Suppress most messages when completing in the minibuffer.
-rw-r--r--lisp/comint.el14
1 files changed, 8 insertions, 6 deletions
diff --git a/lisp/comint.el b/lisp/comint.el
index 46a4be86c26..eb9b083fb42 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -1837,7 +1837,8 @@ completions listing is dependent on the value of `comint-completion-autolist'.
1837Returns t if successful." 1837Returns t if successful."
1838 (interactive) 1838 (interactive)
1839 (if (comint-match-partial-filename) 1839 (if (comint-match-partial-filename)
1840 (prog2 (message "Completing file name...") 1840 (prog2 (or (eq (selected-window) (minibuffer-window))
1841 (message "Completing file name..."))
1841 (comint-dynamic-complete-as-filename)))) 1842 (comint-dynamic-complete-as-filename))))
1842 1843
1843 1844
@@ -1851,13 +1852,14 @@ See `comint-dynamic-complete-filename'. Returns t if successful."
1851 (pathdir (file-name-directory filename)) 1852 (pathdir (file-name-directory filename))
1852 (pathnondir (file-name-nondirectory filename)) 1853 (pathnondir (file-name-nondirectory filename))
1853 (directory (if pathdir (comint-directory pathdir) default-directory)) 1854 (directory (if pathdir (comint-directory pathdir) default-directory))
1854 (completion (file-name-completion pathnondir directory))) 1855 (completion (file-name-completion pathnondir directory))
1856 (mini-flag (eq (selected-window) (minibuffer-window))))
1855 (cond ((null completion) 1857 (cond ((null completion)
1856 (message "No completions of %s" filename) 1858 (message "No completions of %s" filename)
1857 (setq success nil)) 1859 (setq success nil))
1858 ((eq completion t) ; Means already completed "file". 1860 ((eq completion t) ; Means already completed "file".
1859 (if comint-completion-addsuffix (insert " ")) 1861 (if comint-completion-addsuffix (insert " "))
1860 (message "Sole completion")) 1862 (or mini-flag (message "Sole completion")))
1861 ((string-equal completion "") ; Means completion on "directory/". 1863 ((string-equal completion "") ; Means completion on "directory/".
1862 (comint-dynamic-list-filename-completions)) 1864 (comint-dynamic-list-filename-completions))
1863 (t ; Completion string returned. 1865 (t ; Completion string returned.
@@ -1868,19 +1870,19 @@ See `comint-dynamic-complete-filename'. Returns t if successful."
1868 ;; We inserted a unique completion. 1870 ;; We inserted a unique completion.
1869 (if comint-completion-addsuffix 1871 (if comint-completion-addsuffix
1870 (insert (if (file-directory-p file) "/" " "))) 1872 (insert (if (file-directory-p file) "/" " ")))
1871 (message "Completed")) 1873 (or mini-flag (message "Completed")))
1872 ((and comint-completion-recexact comint-completion-addsuffix 1874 ((and comint-completion-recexact comint-completion-addsuffix
1873 (string-equal pathnondir completion) 1875 (string-equal pathnondir completion)
1874 (file-exists-p file)) 1876 (file-exists-p file))
1875 ;; It's not unique, but user wants shortest match. 1877 ;; It's not unique, but user wants shortest match.
1876 (insert (if (file-directory-p file) "/" " ")) 1878 (insert (if (file-directory-p file) "/" " "))
1877 (message "Completed shortest")) 1879 (or mini-flag (message "Completed shortest")))
1878 ((or comint-completion-autolist 1880 ((or comint-completion-autolist
1879 (string-equal pathnondir completion)) 1881 (string-equal pathnondir completion))
1880 ;; It's not unique, list possible completions. 1882 ;; It's not unique, list possible completions.
1881 (comint-dynamic-list-filename-completions)) 1883 (comint-dynamic-list-filename-completions))
1882 (t 1884 (t
1883 (message "Partially completed")))))) 1885 (or mini-flag (message "Partially completed")))))))
1884 success)) 1886 success))
1885 1887
1886 1888