From: Karl Heuer Date: Tue, 22 Mar 1994 22:20:38 +0000 (+0000) Subject: (unreadchar): Don't back up the pointer when unreading EOF. X-Git-Tag: emacs-19.34~9381 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=92fddec9eb13fec973f817093cf5ba662b117c0c;p=emacs.git (unreadchar): Don't back up the pointer when unreading EOF. --- 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);