Commit 92fddec9 authored by Karl Heuer's avatar Karl Heuer
Browse files

(unreadchar): Don't back up the pointer when unreading EOF.

parent f943104a
......@@ -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);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment