changeset 45615:58054a96d922

(choose-completion-string-functions): Doc fix. (choose-completion-string): Add doc string.
author Richard M. Stallman <rms@gnu.org>
date Sun, 02 Jun 2002 00:01:18 +0000
parents 8f47aa4a587a
children cdfc05dbbe0d
files lisp/simple.el
diffstat 1 files changed, 16 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Sat Jun 01 21:57:54 2002 +0000
+++ b/lisp/simple.el	Sun Jun 02 00:01:18 2002 +0000
@@ -3783,19 +3783,25 @@
 CHOICE - the string to insert in the buffer,
 BUFFER - the buffer in which the choice should be inserted,
 MINI-P - non-nil iff BUFFER is a minibuffer,  and
-BASE-SIZE - the part of BUFFER which isn't part of completion.
+BASE-SIZE - the number of characters in BUFFER before
+the string being completed.
+
 If a function in the list returns non-nil, that function is supposed
 to have inserted the CHOICE in the BUFFER, and possibly exited
-the minibuffer; no further functions will be called.")
-
-;; Switch to BUFFER and insert the completion choice CHOICE.
-;; BASE-SIZE, if non-nil, says how many characters of BUFFER's text
-;; to keep.  If it is nil, use choose-completion-delete-max-match instead.
-
-;; If BUFFER is the minibuffer, exit the minibuffer
-;; unless it is reading a file name and CHOICE is a directory,
-;; or completion-no-auto-exit is non-nil.
+the minibuffer; no further functions will be called.
+
+If all functions in the list return nil, that means to use
+the default method of inserting the completion in BUFFER.")
+
 (defun choose-completion-string (choice &optional buffer base-size)
+  "Switch to BUFFER and insert the completion choice CHOICE.
+BASE-SIZE, if non-nil, says how many characters of BUFFER's text
+to keep.  If it is nil, use choose-completion-delete-max-match instead."
+
+  ;; If BUFFER is the minibuffer, exit the minibuffer
+  ;; unless it is reading a file name and CHOICE is a directory,
+  ;; or completion-no-auto-exit is non-nil.
+
   (let ((buffer (or buffer completion-reference-buffer))
 	(mini-p (string-match "\\` \\*Minibuf-[0-9]+\\*\\'" (buffer-name buffer))))
     ;; If BUFFER is a minibuffer, barf unless it's the currently