]> git.eshelyaron.com Git - emacs.git/commitdiff
(choose-completion-string-functions): Doc fix.
authorRichard M. Stallman <rms@gnu.org>
Sun, 2 Jun 2002 00:01:59 +0000 (00:01 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 2 Jun 2002 00:01:59 +0000 (00:01 +0000)
(choose-completion-string): Add doc string.

lisp/ChangeLog
lisp/simple.el

index 53152a2a8a0fcff98a7f7c923bd65150b296b879..f85d8ee2527951d739308fca905b82c7450d9136 100644 (file)
@@ -1,6 +1,11 @@
-2002-06-02  Kim F. Storm  <storm@cua.dk>
+2002-06-01  Richard M. Stallman  <rms@gnu.org>
 
-       * simple.el: Reworked 2001-06-01 change.
+       * simple.el (choose-completion-string-functions): Doc fix.
+       (choose-completion-string): Add doc string.
+
+2002-06-01  Kim F. Storm  <storm@cua.dk>
+
+       * simple.el: Reworked previous change.
        (choose-completion-string1): Merged back into choose-completion-string.
        (choose-completion-string): Run choose-completion-string-functions
        after checking for proper minibuffer window.  Added mini-p arg to
index 9fc3144fb26a32e664bba0ae3b786d4a2976e949..c5fe36e76b13c4caf6b311ab648639937b1c619a 100644 (file)
@@ -3783,19 +3783,25 @@ These functions are called in order with four arguments:
 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.")
+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 all functions in the list return nil, that means to use
+the default method of inserting the completion in BUFFER.")
 
-;; 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.
 (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