From 92fddec9eb13fec973f817093cf5ba662b117c0c Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Tue, 22 Mar 1994 22:20:38 +0000 Subject: [PATCH] (unreadchar): Don't back up the pointer when unreading EOF. --- src/lread.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lread.c b/src/lread.c index af7a0153b02..760cb462483 100644 --- a/src/lread.c +++ b/src/lread.c @@ -165,7 +165,11 @@ unreadchar (readcharfun, c) 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); -- 2.39.5