aboutsummaryrefslogtreecommitdiffstats
path: root/src/lread.c
diff options
context:
space:
mode:
authorJim Blandy1993-01-26 01:58:16 +0000
committerJim Blandy1993-01-26 01:58:16 +0000
commitdbc4e1c12940079cad7b24e1654a0badcda8d6fc (patch)
treee0fbea5b15bd13d2839c8b59b624cec80f31bfd8 /src/lread.c
parent72766144811cd7258b2a59e56f6e3657537ea508 (diff)
downloademacs-dbc4e1c12940079cad7b24e1654a0badcda8d6fc.tar.gz
emacs-dbc4e1c12940079cad7b24e1654a0badcda8d6fc.zip
JimB's changes since January 18th
Diffstat (limited to 'src/lread.c')
-rw-r--r--src/lread.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/lread.c b/src/lread.c
index 0198dda9aca..721955c358b 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -203,7 +203,7 @@ If you want to read non-character events, or ignore them, call\n\
203 /* Only ASCII characters are acceptable. */ 203 /* Only ASCII characters are acceptable. */
204 if (XTYPE (val) != Lisp_Int) 204 if (XTYPE (val) != Lisp_Int)
205 { 205 {
206 unread_command_event = val; 206 unread_command_events = Fcons (val, Qnil);
207 error ("Object read was not a character"); 207 error ("Object read was not a character");
208 } 208 }
209 } 209 }
@@ -1045,9 +1045,17 @@ read1 (readcharfun)
1045 if (p1 != p) 1045 if (p1 != p)
1046 { 1046 {
1047 while (p1 != p && (c = *p1) >= '0' && c <= '9') p1++; 1047 while (p1 != p && (c = *p1) >= '0' && c <= '9') p1++;
1048#ifdef LISP_FLOAT_TYPE
1049 /* Integers can have trailing decimal points. */
1050 if (p1 < p && *p1 == '.') p1++;
1051#endif
1048 if (p1 == p) 1052 if (p1 == p)
1049 /* It is. */ 1053 /* It is an integer. */
1050 { 1054 {
1055#ifdef LISP_FLOAT_TYPE
1056 if (p1[-1] == '.')
1057 p1[-1] = '\0';
1058#endif
1051 XSET (val, Lisp_Int, atoi (read_buffer)); 1059 XSET (val, Lisp_Int, atoi (read_buffer));
1052 return val; 1060 return val;
1053 } 1061 }