diff options
| author | Richard M. Stallman | 2002-06-02 00:01:59 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2002-06-02 00:01:59 +0000 |
| commit | 12829a07d6bd4f1f24b98adf852e153a103bb184 (patch) | |
| tree | ba0c0d9a53ffc989022e07e140bd72b49135a896 /lisp | |
| parent | cb8d4d07073f91dd7d2c849797e22921e0daa908 (diff) | |
| download | emacs-12829a07d6bd4f1f24b98adf852e153a103bb184.tar.gz emacs-12829a07d6bd4f1f24b98adf852e153a103bb184.zip | |
(choose-completion-string-functions): Doc fix.
(choose-completion-string): Add doc string.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/simple.el | 22 |
2 files changed, 21 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 53152a2a8a0..f85d8ee2527 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,6 +1,11 @@ | |||
| 1 | 2002-06-02 Kim F. Storm <storm@cua.dk> | 1 | 2002-06-01 Richard M. Stallman <rms@gnu.org> |
| 2 | 2 | ||
| 3 | * simple.el: Reworked 2001-06-01 change. | 3 | * simple.el (choose-completion-string-functions): Doc fix. |
| 4 | (choose-completion-string): Add doc string. | ||
| 5 | |||
| 6 | 2002-06-01 Kim F. Storm <storm@cua.dk> | ||
| 7 | |||
| 8 | * simple.el: Reworked previous change. | ||
| 4 | (choose-completion-string1): Merged back into choose-completion-string. | 9 | (choose-completion-string1): Merged back into choose-completion-string. |
| 5 | (choose-completion-string): Run choose-completion-string-functions | 10 | (choose-completion-string): Run choose-completion-string-functions |
| 6 | after checking for proper minibuffer window. Added mini-p arg to | 11 | after checking for proper minibuffer window. Added mini-p arg to |
diff --git a/lisp/simple.el b/lisp/simple.el index 9fc3144fb26..c5fe36e76b1 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -3783,19 +3783,25 @@ These functions are called in order with four arguments: | |||
| 3783 | CHOICE - the string to insert in the buffer, | 3783 | CHOICE - the string to insert in the buffer, |
| 3784 | BUFFER - the buffer in which the choice should be inserted, | 3784 | BUFFER - the buffer in which the choice should be inserted, |
| 3785 | MINI-P - non-nil iff BUFFER is a minibuffer, and | 3785 | MINI-P - non-nil iff BUFFER is a minibuffer, and |
| 3786 | BASE-SIZE - the part of BUFFER which isn't part of completion. | 3786 | BASE-SIZE - the number of characters in BUFFER before |
| 3787 | the string being completed. | ||
| 3788 | |||
| 3787 | If a function in the list returns non-nil, that function is supposed | 3789 | If a function in the list returns non-nil, that function is supposed |
| 3788 | to have inserted the CHOICE in the BUFFER, and possibly exited | 3790 | to have inserted the CHOICE in the BUFFER, and possibly exited |
| 3789 | the minibuffer; no further functions will be called.") | 3791 | the minibuffer; no further functions will be called. |
| 3790 | 3792 | ||
| 3791 | ;; Switch to BUFFER and insert the completion choice CHOICE. | 3793 | If all functions in the list return nil, that means to use |
| 3792 | ;; BASE-SIZE, if non-nil, says how many characters of BUFFER's text | 3794 | the default method of inserting the completion in BUFFER.") |
| 3793 | ;; to keep. If it is nil, use choose-completion-delete-max-match instead. | ||
| 3794 | 3795 | ||
| 3795 | ;; If BUFFER is the minibuffer, exit the minibuffer | ||
| 3796 | ;; unless it is reading a file name and CHOICE is a directory, | ||
| 3797 | ;; or completion-no-auto-exit is non-nil. | ||
| 3798 | (defun choose-completion-string (choice &optional buffer base-size) | 3796 | (defun choose-completion-string (choice &optional buffer base-size) |
| 3797 | "Switch to BUFFER and insert the completion choice CHOICE. | ||
| 3798 | BASE-SIZE, if non-nil, says how many characters of BUFFER's text | ||
| 3799 | to keep. If it is nil, use choose-completion-delete-max-match instead." | ||
| 3800 | |||
| 3801 | ;; If BUFFER is the minibuffer, exit the minibuffer | ||
| 3802 | ;; unless it is reading a file name and CHOICE is a directory, | ||
| 3803 | ;; or completion-no-auto-exit is non-nil. | ||
| 3804 | |||
| 3799 | (let ((buffer (or buffer completion-reference-buffer)) | 3805 | (let ((buffer (or buffer completion-reference-buffer)) |
| 3800 | (mini-p (string-match "\\` \\*Minibuf-[0-9]+\\*\\'" (buffer-name buffer)))) | 3806 | (mini-p (string-match "\\` \\*Minibuf-[0-9]+\\*\\'" (buffer-name buffer)))) |
| 3801 | ;; If BUFFER is a minibuffer, barf unless it's the currently | 3807 | ;; If BUFFER is a minibuffer, barf unless it's the currently |