aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-03-08 17:43:37 +0000
committerRichard M. Stallman1994-03-08 17:43:37 +0000
commit497513adfb749d50f50e84edd3228b015d85235c (patch)
treec90135c43ff03471842e4cd8457260110197e125
parente11284d5d2e49992d0bc14f01462a4413cd47551 (diff)
downloademacs-497513adfb749d50f50e84edd3228b015d85235c.tar.gz
emacs-497513adfb749d50f50e84edd3228b015d85235c.zip
(comint-completion-fignore): New variable.
(comint-dynamic-complete-as-filename): Use it.
-rw-r--r--lisp/comint.el19
1 files changed, 12 insertions, 7 deletions
diff --git a/lisp/comint.el b/lisp/comint.el
index 0231cc6a9d5..55f95c42361 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -116,6 +116,7 @@
116;;; comint-input-ignoredups - boolean ... 116;;; comint-input-ignoredups - boolean ...
117;;; comint-last-input-match - string ... 117;;; comint-last-input-match - string ...
118;;; comint-dynamic-complete-functions - hook For the completion mechanism 118;;; comint-dynamic-complete-functions - hook For the completion mechanism
119;;; comint-completion-fignore - list ...
119;;; comint-get-old-input - function Hooks for specific 120;;; comint-get-old-input - function Hooks for specific
120;;; comint-input-filter-functions - hook process-in-a-buffer 121;;; comint-input-filter-functions - hook process-in-a-buffer
121;;; comint-output-filter-functions - hook function modes. 122;;; comint-output-filter-functions - hook function modes.
@@ -360,6 +361,7 @@ Entry to this mode runs the hooks on `comint-mode-hook'."
360 (make-local-variable 'comint-input-ignoredups) 361 (make-local-variable 'comint-input-ignoredups)
361 (make-local-variable 'comint-delimiter-argument-list) 362 (make-local-variable 'comint-delimiter-argument-list)
362 (make-local-variable 'comint-dynamic-complete-functions) 363 (make-local-variable 'comint-dynamic-complete-functions)
364 (make-local-variable 'comint-completion-fignore)
363 (make-local-variable 'comint-get-old-input) 365 (make-local-variable 'comint-get-old-input)
364 (make-local-variable 'comint-input-filter-functions) 366 (make-local-variable 'comint-input-filter-functions)
365 (make-local-variable 'comint-input-filter) 367 (make-local-variable 'comint-input-filter)
@@ -1726,6 +1728,12 @@ This mirrors the optional behavior of tcsh.
1726 1728
1727A non-nil value is useful if `comint-completion-autolist' is non-nil too.") 1729A non-nil value is useful if `comint-completion-autolist' is non-nil too.")
1728 1730
1731(defvar comint-completion-fignore nil
1732 "*List of suffixes to be disregarded during file completion.
1733This mirrors the optional behavior of bash and tcsh.
1734
1735Note that this applies to `comint-dynamic-complete-filename' only.")
1736
1729(defvar comint-file-name-prefix "" 1737(defvar comint-file-name-prefix ""
1730 "Prefix prepended to absolute file names taken from process input. 1738 "Prefix prepended to absolute file names taken from process input.
1731This is used by comint's and shell's completion functions, and by shell's 1739This is used by comint's and shell's completion functions, and by shell's
@@ -1783,9 +1791,9 @@ it won't change parts of the filename already entered in the buffer; it just
1783adds completion characters to the end of the filename. A completions listing 1791adds completion characters to the end of the filename. A completions listing
1784may be shown in a help buffer if completion is ambiguous. 1792may be shown in a help buffer if completion is ambiguous.
1785 1793
1786Completion is dependent on the value of `comint-completion-addsuffix' and 1794Completion is dependent on the value of `comint-completion-addsuffix',
1787`comint-completion-recexact', and the timing of completions listing is 1795`comint-completion-recexact' and `comint-completion-fignore', and the timing of
1788dependent on the value of `comint-completion-autolist'. 1796completions listing is dependent on the value of `comint-completion-autolist'.
1789 1797
1790Returns t if successful." 1798Returns t if successful."
1791 (interactive) 1799 (interactive)
@@ -1798,9 +1806,8 @@ Returns t if successful."
1798 "Dynamically complete at point as a filename. 1806 "Dynamically complete at point as a filename.
1799See `comint-dynamic-complete-filename'. Returns t if successful." 1807See `comint-dynamic-complete-filename'. Returns t if successful."
1800 (let* ((completion-ignore-case nil) 1808 (let* ((completion-ignore-case nil)
1809 (completion-ignored-extensions comint-completion-fignore)
1801 (success t) 1810 (success t)
1802 ;; For shell completion, treat all files as equally interesting.
1803 (completion-ignored-extensions nil)
1804 (filename (or (comint-match-partial-filename) "")) 1811 (filename (or (comint-match-partial-filename) ""))
1805 (pathdir (file-name-directory filename)) 1812 (pathdir (file-name-directory filename))
1806 (pathnondir (file-name-nondirectory filename)) 1813 (pathnondir (file-name-nondirectory filename))
@@ -1904,8 +1911,6 @@ See also `comint-dynamic-complete-filename'."
1904 "List in help buffer possible completions of the filename at point." 1911 "List in help buffer possible completions of the filename at point."
1905 (interactive) 1912 (interactive)
1906 (let* ((completion-ignore-case nil) 1913 (let* ((completion-ignore-case nil)
1907 ;; For shell completion, treat all files as equally interesting.
1908 (completion-ignored-extensions nil)
1909 (filename (or (comint-match-partial-filename) "")) 1914 (filename (or (comint-match-partial-filename) ""))
1910 (pathdir (file-name-directory filename)) 1915 (pathdir (file-name-directory filename))
1911 (pathnondir (file-name-nondirectory filename)) 1916 (pathnondir (file-name-nondirectory filename))