diff options
author | Juri Linkov <juri@jurta.org> | 2008-03-21 23:58:06 +0000 |
---|---|---|
committer | Juri Linkov <juri@jurta.org> | 2008-03-21 23:58:06 +0000 |
commit | c59a65bdacba84581a6bbc8c6b5615ad717d55fb (patch) | |
tree | 620f7d0abba0707b05499431c82fea3ea82254cb /lisp/comint.el | |
parent | c35be7ec907278bf13968530b2c091fd91a93eba (diff) | |
download | emacs-c59a65bdacba84581a6bbc8c6b5615ad717d55fb.tar.gz |
* comint.el (comint-dynamic-simple-complete):
Use variable `stub' for the second arg `common-substring'
of `comint-dynamic-list-completions'.
(comint-dynamic-list-filename-completions):
Use variable `filenondir' for the second arg `common-substring'
of `comint-dynamic-list-completions'.
(comint-dynamic-list-completions): Add new optional arg
`common-substring'. Add `common-substring' as the
second arg of the call to `display-completion-list'. Doc fix.
Diffstat (limited to 'lisp/comint.el')
-rw-r--r-- | lisp/comint.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/comint.el b/lisp/comint.el index 748006b1b2b..2a872e4fb99 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -2972,7 +2972,7 @@ See also `comint-dynamic-complete-filename'." ((or comint-completion-autolist (string-equal stub completion)) ;; It's not unique, list possible completions. - (comint-dynamic-list-completions completions) + (comint-dynamic-list-completions completions stub) 'listed) (t (unless minibuffer-p @@ -2998,7 +2998,8 @@ See also `comint-dynamic-complete-filename'." (minibuffer-message (format " [No completions of %s]" filename)) (message "No completions of %s" filename)) (comint-dynamic-list-completions - (mapcar 'comint-quote-filename completions))))) + (mapcar 'comint-quote-filename completions) + filenondir)))) ;; This is bound locally in a *Completions* buffer to the list of @@ -3008,8 +3009,9 @@ See also `comint-dynamic-complete-filename'." (defvar comint-dynamic-list-completions-config nil) -(defun comint-dynamic-list-completions (completions) +(defun comint-dynamic-list-completions (completions &optional common-substring) "List in help buffer sorted COMPLETIONS. +The meaning of COMMON-SUBSTRING is the same as in `display-completion-list'. Typing SPC flushes the help buffer." (let ((window (get-buffer-window "*Completions*" 0))) (setq completions (sort completions 'string-lessp)) @@ -3041,7 +3043,7 @@ Typing SPC flushes the help buffer." (setq comint-dynamic-list-completions-config (current-window-configuration)) (with-output-to-temp-buffer "*Completions*" - (display-completion-list completions)) + (display-completion-list completions common-substring)) (if (window-minibuffer-p (selected-window)) (minibuffer-message " [Type space to flush; repeat completion command to scroll]") (message "Type space to flush; repeat completion command to scroll"))) |