aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLars Ingebrigtsen2019-08-15 15:04:30 -0700
committerLars Ingebrigtsen2019-08-15 15:04:30 -0700
commit3c494946913e164e997c5e57cba7474813039355 (patch)
tree89008fbe149d7ef2952dd427c711c09abcb152e5 /src
parentdabefb2ae1e3abb4eaa54c0ed356867a4fbcd306 (diff)
downloademacs-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.c12
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
764If the optional argument PROMPT is non-nil, display that as a prompt. 764If the optional argument PROMPT is non-nil, display that as a prompt.
765If PROMPT is nil or the string \"\", the key sequence/events that led
766to the current command is used as the prompt.
767
765If the optional argument INHERIT-INPUT-METHOD is non-nil and some 768If the optional argument INHERIT-INPUT-METHOD is non-nil and some
766input method is turned on in the current buffer, that input method 769input method is turned on in the current buffer, that input method
767is used for reading a character. 770is used for reading a character.
771
768If the optional argument SECONDS is non-nil, it should be a number 772If the optional argument SECONDS is non-nil, it should be a number
769specifying the maximum number of seconds to wait for input. If no 773specifying the maximum number of seconds to wait for input. If no
770input arrives in that time, return nil. SECONDS may be a 774input arrives in that time, return nil. SECONDS may be a
@@ -784,9 +788,13 @@ floating-point value. */)
784DEFUN ("read-event", Fread_event, Sread_event, 0, 3, 0, 788DEFUN ("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.
786If the optional argument PROMPT is non-nil, display that as a prompt. 790If the optional argument PROMPT is non-nil, display that as a prompt.
791If PROMPT is nil or the string \"\", the key sequence/events that led
792to the current command is used as the prompt.
793
787If the optional argument INHERIT-INPUT-METHOD is non-nil and some 794If the optional argument INHERIT-INPUT-METHOD is non-nil and some
788input method is turned on in the current buffer, that input method 795input method is turned on in the current buffer, that input method
789is used for reading a character. 796is used for reading a character.
797
790If the optional argument SECONDS is non-nil, it should be a number 798If the optional argument SECONDS is non-nil, it should be a number
791specifying the maximum number of seconds to wait for input. If no 799specifying the maximum number of seconds to wait for input. If no
792input arrives in that time, return nil. SECONDS may be a 800input 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'
809to recover the character code with the modifiers removed. 817to recover the character code with the modifiers removed.
810 818
811If the optional argument PROMPT is non-nil, display that as a prompt. 819If the optional argument PROMPT is non-nil, display that as a prompt.
820If PROMPT is nil or the string \"\", the key sequence/events that led
821to the current command is used as the prompt.
822
812If the optional argument INHERIT-INPUT-METHOD is non-nil and some 823If the optional argument INHERIT-INPUT-METHOD is non-nil and some
813input method is turned on in the current buffer, that input method 824input method is turned on in the current buffer, that input method
814is used for reading a character. 825is used for reading a character.
826
815If the optional argument SECONDS is non-nil, it should be a number 827If the optional argument SECONDS is non-nil, it should be a number
816specifying the maximum number of seconds to wait for input. If no 828specifying the maximum number of seconds to wait for input. If no
817input arrives in that time, return nil. SECONDS may be a 829input arrives in that time, return nil. SECONDS may be a