diff options
| author | Jim Blandy | 1992-07-22 20:59:53 +0000 |
|---|---|---|
| committer | Jim Blandy | 1992-07-22 20:59:53 +0000 |
| commit | e51e47f72998dacc5b8ebc2073a8dec7e6160af5 (patch) | |
| tree | d4cd141cdfdefc9b7b434df4ab0151b2d1183734 /src | |
| parent | 1d1826db27c2f2ec1aaeb6161d928e36f353a759 (diff) | |
| download | emacs-e51e47f72998dacc5b8ebc2073a8dec7e6160af5.tar.gz emacs-e51e47f72998dacc5b8ebc2073a8dec7e6160af5.zip | |
entered into RCS
Diffstat (limited to 'src')
| -rw-r--r-- | src/lread.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/lread.c b/src/lread.c index 279f64a81b7..c57192d6a09 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -160,7 +160,11 @@ static Lisp_Object read0 (), read1 (), read_list (), read_vector (); | |||
| 160 | 160 | ||
| 161 | DEFUN ("read-char", Fread_char, Sread_char, 0, 0, 0, | 161 | DEFUN ("read-char", Fread_char, Sread_char, 0, 0, 0, |
| 162 | "Read a character from the command input (keyboard or macro).\n\ | 162 | "Read a character from the command input (keyboard or macro).\n\ |
| 163 | It is returned as a number.") | 163 | It is returned as a number.\n\ |
| 164 | If the user generates an event which is not a character (i.e. a mouse\n\ | ||
| 165 | click or function key event), `read-char' signals an error. If you\n\ | ||
| 166 | want to read non-character events, or ignore them, call `read-event'\n\ | ||
| 167 | or `read-char-exclusive' instead.") | ||
| 164 | () | 168 | () |
| 165 | { | 169 | { |
| 166 | register Lisp_Object val; | 170 | register Lisp_Object val; |
| @@ -179,7 +183,6 @@ It is returned as a number.") | |||
| 179 | return val; | 183 | return val; |
| 180 | } | 184 | } |
| 181 | 185 | ||
| 182 | #ifdef HAVE_X_WINDOWS | ||
| 183 | DEFUN ("read-event", Fread_event, Sread_event, 0, 0, 0, | 186 | DEFUN ("read-event", Fread_event, Sread_event, 0, 0, 0, |
| 184 | "Read an event object from the input stream.") | 187 | "Read an event object from the input stream.") |
| 185 | () | 188 | () |
| @@ -189,7 +192,6 @@ DEFUN ("read-event", Fread_event, Sread_event, 0, 0, 0, | |||
| 189 | val = read_char (0); | 192 | val = read_char (0); |
| 190 | return val; | 193 | return val; |
| 191 | } | 194 | } |
| 192 | #endif | ||
| 193 | 195 | ||
| 194 | DEFUN ("read-char-exclusive", Fread_char_exclusive, Sread_char_exclusive, 0, 0, 0, | 196 | DEFUN ("read-char-exclusive", Fread_char_exclusive, Sread_char_exclusive, 0, 0, 0, |
| 195 | "Read a character from the command input (keyboard or macro).\n\ | 197 | "Read a character from the command input (keyboard or macro).\n\ |
| @@ -199,9 +201,11 @@ It is returned as a number. Non character events are ignored.") | |||
| 199 | register Lisp_Object val; | 201 | register Lisp_Object val; |
| 200 | 202 | ||
| 201 | #ifndef standalone | 203 | #ifndef standalone |
| 202 | val = read_char (0); | 204 | do |
| 203 | while (XTYPE (val) != Lisp_Int) | 205 | { |
| 204 | val = read_char (0); | 206 | val = read_char (0); |
| 207 | } | ||
| 208 | while (XTYPE (val) != Lisp_Int); | ||
| 205 | #else | 209 | #else |
| 206 | val = getchar (); | 210 | val = getchar (); |
| 207 | #endif | 211 | #endif |
| @@ -1565,9 +1569,7 @@ syms_of_lread () | |||
| 1565 | defsubr (&Seval_region); | 1569 | defsubr (&Seval_region); |
| 1566 | defsubr (&Sread_char); | 1570 | defsubr (&Sread_char); |
| 1567 | defsubr (&Sread_char_exclusive); | 1571 | defsubr (&Sread_char_exclusive); |
| 1568 | #ifdef HAVE_X_WINDOWS | ||
| 1569 | defsubr (&Sread_event); | 1572 | defsubr (&Sread_event); |
| 1570 | #endif /* HAVE_X_WINDOWS */ | ||
| 1571 | defsubr (&Sget_file_char); | 1573 | defsubr (&Sget_file_char); |
| 1572 | defsubr (&Smapatoms); | 1574 | defsubr (&Smapatoms); |
| 1573 | 1575 | ||