summaryrefslogtreecommitdiff
path: root/src/lread.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@redhat.com>1993-01-26 01:58:16 +0000
committerJim Blandy <jimb@redhat.com>1993-01-26 01:58:16 +0000
commit6056db491ff15bd710ba6fc54ebcd1ee642c850b (patch)
treec4d83e7727d0aa60563101cb828d12a5dc2e5685 /src/lread.c
parentd2cf404862d35167ac7245c10d3851070885b9b8 (diff)
downloademacs-6056db491ff15bd710ba6fc54ebcd1ee642c850b.tar.gz
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\
/* Only ASCII characters are acceptable. */
if (XTYPE (val) != Lisp_Int)
{
- unread_command_event = val;
+ unread_command_events = Fcons (val, Qnil);
error ("Object read was not a character");
}
}
@@ -1045,9 +1045,17 @@ read1 (readcharfun)
if (p1 != p)
{
while (p1 != p && (c = *p1) >= '0' && c <= '9') p1++;
+#ifdef LISP_FLOAT_TYPE
+ /* Integers can have trailing decimal points. */
+ if (p1 < p && *p1 == '.') p1++;
+#endif
if (p1 == p)
- /* It is. */
+ /* It is an integer. */
{
+#ifdef LISP_FLOAT_TYPE
+ if (p1[-1] == '.')
+ p1[-1] = '\0';
+#endif
XSET (val, Lisp_Int, atoi (read_buffer));
return val;
}