aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/comint.el
diff options
context:
space:
mode:
authorStefan Monnier2010-12-13 10:27:36 -0500
committerStefan Monnier2010-12-13 10:27:36 -0500
commitf49d1f52b2e368ef67dcfececd426de958548f4e (patch)
treece24ced92f2acc976daf4b69e3634c8bd600e44e /lisp/comint.el
parent07176b2a9e63a0d3933b167f987475d8a18da5cc (diff)
parent11aad4e9f9f54ce8e9ecc66347e512b20a3cdf39 (diff)
downloademacs-f49d1f52b2e368ef67dcfececd426de958548f4e.tar.gz
emacs-f49d1f52b2e368ef67dcfececd426de958548f4e.zip
Merge from emacs-23
Diffstat (limited to 'lisp/comint.el')
-rw-r--r--lisp/comint.el37
1 files changed, 19 insertions, 18 deletions
diff --git a/lisp/comint.el b/lisp/comint.el
index b4d06cefafb..bd563ee4592 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -1009,7 +1009,7 @@ See also `comint-read-input-ring'."
1009 (choose-completion-string completion buffer))) 1009 (choose-completion-string completion buffer)))
1010 1010
1011(defun comint-dynamic-list-input-ring () 1011(defun comint-dynamic-list-input-ring ()
1012 "List in help buffer the buffer's input history." 1012 "Display a list of recent inputs entered into the current buffer."
1013 (interactive) 1013 (interactive)
1014 (if (or (not (ring-p comint-input-ring)) 1014 (if (or (not (ring-p comint-input-ring))
1015 (ring-empty-p comint-input-ring)) 1015 (ring-empty-p comint-input-ring))
@@ -3003,7 +3003,7 @@ Completes if after a filename. See `comint-match-partial-filename' and
3003This function is similar to `comint-replace-by-expanded-filename', except that 3003This function is similar to `comint-replace-by-expanded-filename', except that
3004it won't change parts of the filename already entered in the buffer; it just 3004it won't change parts of the filename already entered in the buffer; it just
3005adds completion characters to the end of the filename. A completions listing 3005adds completion characters to the end of the filename. A completions listing
3006may be shown in a help buffer if completion is ambiguous. 3006may be shown in a separate buffer if completion is ambiguous.
3007 3007
3008Completion is dependent on the value of `comint-completion-addsuffix', 3008Completion is dependent on the value of `comint-completion-addsuffix',
3009`comint-completion-recexact' and `comint-completion-fignore', and the timing of 3009`comint-completion-recexact' and `comint-completion-fignore', and the timing of
@@ -3090,11 +3090,11 @@ See `comint-dynamic-complete-filename'. Returns t if successful."
3090 3090
3091(defun comint-replace-by-expanded-filename () 3091(defun comint-replace-by-expanded-filename ()
3092 "Dynamically expand and complete the filename at point. 3092 "Dynamically expand and complete the filename at point.
3093Replace the filename with an expanded, canonicalized and completed replacement. 3093Replace the filename with an expanded, canonicalized and
3094\"Expanded\" means environment variables (e.g., $HOME) and `~'s are replaced 3094completed replacement, i.e. substituting environment
3095with the corresponding directories. \"Canonicalized\" means `..' and `.' are 3095variables (e.g. $HOME), `~'s, `..', and `.', and making the
3096removed, and the filename is made absolute instead of relative. For expansion 3096filename absolute. For expansion see `expand-file-name' and
3097see `expand-file-name' and `substitute-in-file-name'. For completion see 3097`substitute-in-file-name'. For completion see
3098`comint-dynamic-complete-filename'." 3098`comint-dynamic-complete-filename'."
3099 (interactive) 3099 (interactive)
3100 (let ((filename (comint-match-partial-filename))) 3100 (let ((filename (comint-match-partial-filename)))
@@ -3105,15 +3105,16 @@ see `expand-file-name' and `substitute-in-file-name'. For completion see
3105 3105
3106(defun comint-dynamic-simple-complete (stub candidates) 3106(defun comint-dynamic-simple-complete (stub candidates)
3107 "Dynamically complete STUB from CANDIDATES list. 3107 "Dynamically complete STUB from CANDIDATES list.
3108This function inserts completion characters at point by completing STUB from 3108This function inserts completion characters at point by
3109the strings in CANDIDATES. A completions listing may be shown in a help buffer 3109completing STUB from the strings in CANDIDATES. If completion is
3110if completion is ambiguous. 3110ambiguous, possibly show a completions listing in a separate
3111buffer.
3111 3112
3112Returns nil if no completion was inserted. 3113Return nil if no completion was inserted.
3113Returns `sole' if completed with the only completion match. 3114Return `sole' if completed with the only completion match.
3114Returns `shortest' if completed with the shortest of the completion matches. 3115Return `shortest' if completed with the shortest match.
3115Returns `partial' if completed as far as possible with the completion matches. 3116Return `partial' if completed as far as possible.
3116Returns `listed' if a completion listing was shown. 3117Return `listed' if a completion listing was shown.
3117 3118
3118See also `comint-dynamic-complete-filename'." 3119See also `comint-dynamic-complete-filename'."
3119 (let* ((completion-ignore-case (memq system-type '(ms-dos windows-nt cygwin))) 3120 (let* ((completion-ignore-case (memq system-type '(ms-dos windows-nt cygwin)))
@@ -3161,7 +3162,7 @@ See also `comint-dynamic-complete-filename'."
3161 3162
3162 3163
3163(defun comint-dynamic-list-filename-completions () 3164(defun comint-dynamic-list-filename-completions ()
3164 "List in help buffer possible completions of the filename at point." 3165 "Display a list of possible completions for the filename at point."
3165 (interactive) 3166 (interactive)
3166 (let* ((completion-ignore-case read-file-name-completion-ignore-case) 3167 (let* ((completion-ignore-case read-file-name-completion-ignore-case)
3167 ;; If we bind this, it breaks remote directory tracking in rlogin.el. 3168 ;; If we bind this, it breaks remote directory tracking in rlogin.el.
@@ -3190,9 +3191,9 @@ See also `comint-dynamic-complete-filename'."
3190(defvar comint-dynamic-list-completions-config nil) 3191(defvar comint-dynamic-list-completions-config nil)
3191 3192
3192(defun comint-dynamic-list-completions (completions &optional common-substring) 3193(defun comint-dynamic-list-completions (completions &optional common-substring)
3193 "List in help buffer sorted COMPLETIONS. 3194 "Display a list of sorted COMPLETIONS.
3194The meaning of COMMON-SUBSTRING is the same as in `display-completion-list'. 3195The meaning of COMMON-SUBSTRING is the same as in `display-completion-list'.
3195Typing SPC flushes the help buffer." 3196Typing SPC flushes the completions buffer."
3196 (let ((window (get-buffer-window "*Completions*" 0))) 3197 (let ((window (get-buffer-window "*Completions*" 0)))
3197 (setq completions (sort completions 'string-lessp)) 3198 (setq completions (sort completions 'string-lessp))
3198 (if (and (eq last-command this-command) 3199 (if (and (eq last-command this-command)