changeset 6471:4e6b54b64d94

(unreadchar): Don't back up the pointer when unreading EOF.
author Karl Heuer <kwzh@gnu.org>
date Tue, 22 Mar 1994 22:20:38 +0000
parents 651b49e52c9e
children 7491cbb3d1a3
files src/lread.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lread.c	Tue Mar 22 21:59:02 1994 +0000
+++ b/src/lread.c	Tue Mar 22 22:20:38 1994 +0000
@@ -165,7 +165,11 @@
      Lisp_Object readcharfun;
      int c;
 {
-  if (XTYPE (readcharfun) == Lisp_Buffer)
+  if (c == -1)
+    /* Don't back up the pointer if we're unreading the end-of-input mark,
+       since readchar didn't advance it when we read it.  */
+    ;
+  else if (XTYPE (readcharfun) == Lisp_Buffer)
     {
       if (XBUFFER (readcharfun) == current_buffer)
 	SET_PT (point - 1);