diff options
| author | Lars Ingebrigtsen | 2019-08-15 15:04:30 -0700 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-08-15 15:04:30 -0700 |
| commit | 3c494946913e164e997c5e57cba7474813039355 (patch) | |
| tree | 89008fbe149d7ef2952dd427c711c09abcb152e5 /src | |
| parent | dabefb2ae1e3abb4eaa54c0ed356867a4fbcd306 (diff) | |
| download | emacs-3c494946913e164e997c5e57cba7474813039355.tar.gz emacs-3c494946913e164e997c5e57cba7474813039355.zip | |
Mention what effect nil has as the prompt for read-event/char/etc
* doc/lispref/commands.texi (Reading One Event): Mention that ""
has the same effect as nil as a prompt.
* src/lread.c (Fread_event, Fread_char_exclusive, Fread_char):
Mention what happens when PROMPT is nil/"" in the doc string
(bug#15012).
Diffstat (limited to 'src')
| -rw-r--r-- | src/lread.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lread.c b/src/lread.c index eec88760d42..1bfbf5aa865 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -762,9 +762,13 @@ If you want to read non-character events, or ignore them, call | |||
| 762 | `read-event' or `read-char-exclusive' instead. | 762 | `read-event' or `read-char-exclusive' instead. |
| 763 | 763 | ||
| 764 | If the optional argument PROMPT is non-nil, display that as a prompt. | 764 | If the optional argument PROMPT is non-nil, display that as a prompt. |
| 765 | If PROMPT is nil or the string \"\", the key sequence/events that led | ||
| 766 | to the current command is used as the prompt. | ||
| 767 | |||
| 765 | If the optional argument INHERIT-INPUT-METHOD is non-nil and some | 768 | If the optional argument INHERIT-INPUT-METHOD is non-nil and some |
| 766 | input method is turned on in the current buffer, that input method | 769 | input method is turned on in the current buffer, that input method |
| 767 | is used for reading a character. | 770 | is used for reading a character. |
| 771 | |||
| 768 | If the optional argument SECONDS is non-nil, it should be a number | 772 | If the optional argument SECONDS is non-nil, it should be a number |
| 769 | specifying the maximum number of seconds to wait for input. If no | 773 | specifying the maximum number of seconds to wait for input. If no |
| 770 | input arrives in that time, return nil. SECONDS may be a | 774 | input arrives in that time, return nil. SECONDS may be a |
| @@ -784,9 +788,13 @@ floating-point value. */) | |||
| 784 | DEFUN ("read-event", Fread_event, Sread_event, 0, 3, 0, | 788 | DEFUN ("read-event", Fread_event, Sread_event, 0, 3, 0, |
| 785 | doc: /* Read an event object from the input stream. | 789 | doc: /* Read an event object from the input stream. |
| 786 | If the optional argument PROMPT is non-nil, display that as a prompt. | 790 | If the optional argument PROMPT is non-nil, display that as a prompt. |
| 791 | If PROMPT is nil or the string \"\", the key sequence/events that led | ||
| 792 | to the current command is used as the prompt. | ||
| 793 | |||
| 787 | If the optional argument INHERIT-INPUT-METHOD is non-nil and some | 794 | If the optional argument INHERIT-INPUT-METHOD is non-nil and some |
| 788 | input method is turned on in the current buffer, that input method | 795 | input method is turned on in the current buffer, that input method |
| 789 | is used for reading a character. | 796 | is used for reading a character. |
| 797 | |||
| 790 | If the optional argument SECONDS is non-nil, it should be a number | 798 | If the optional argument SECONDS is non-nil, it should be a number |
| 791 | specifying the maximum number of seconds to wait for input. If no | 799 | specifying the maximum number of seconds to wait for input. If no |
| 792 | input arrives in that time, return nil. SECONDS may be a | 800 | input arrives in that time, return nil. SECONDS may be a |
| @@ -809,9 +817,13 @@ character code: it will fail the `characterp' test. Use `event-basic-type' | |||
| 809 | to recover the character code with the modifiers removed. | 817 | to recover the character code with the modifiers removed. |
| 810 | 818 | ||
| 811 | If the optional argument PROMPT is non-nil, display that as a prompt. | 819 | If the optional argument PROMPT is non-nil, display that as a prompt. |
| 820 | If PROMPT is nil or the string \"\", the key sequence/events that led | ||
| 821 | to the current command is used as the prompt. | ||
| 822 | |||
| 812 | If the optional argument INHERIT-INPUT-METHOD is non-nil and some | 823 | If the optional argument INHERIT-INPUT-METHOD is non-nil and some |
| 813 | input method is turned on in the current buffer, that input method | 824 | input method is turned on in the current buffer, that input method |
| 814 | is used for reading a character. | 825 | is used for reading a character. |
| 826 | |||
| 815 | If the optional argument SECONDS is non-nil, it should be a number | 827 | If the optional argument SECONDS is non-nil, it should be a number |
| 816 | specifying the maximum number of seconds to wait for input. If no | 828 | specifying the maximum number of seconds to wait for input. If no |
| 817 | input arrives in that time, return nil. SECONDS may be a | 829 | input arrives in that time, return nil. SECONDS may be a |