From a3123c1330535e48aecfbf19dadd5bfd577738db Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 2 Jan 1998 21:27:40 +0000 Subject: [PATCH] (readchar): Use marker's bytepos instead of bufpos. --- src/lread.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/lread.c b/src/lread.c index c6f6a53d2c8..2f3418306aa 100644 --- a/src/lread.c +++ b/src/lread.c @@ -208,22 +208,17 @@ readchar (readcharfun) if (bytepos >= BUF_ZV_BYTE (inbuffer)) return -1; - if (XMARKER (readcharfun)->bufpos == BUF_GPT_BYTE (inbuffer)) - XMARKER (readcharfun)->bufpos += BUF_GAP_SIZE (inbuffer); - if (! NILP (inbuffer->enable_multibyte_characters)) INC_POS (bytepos); else bytepos++; - XMARKER (readcharfun)->bufpos += bytepos - orig_bytepos; + XMARKER (readcharfun)->bytepos = bytepos; XMARKER (readcharfun)->charpos++; readchar_backlog = bytepos - orig_bytepos; } - /* Because we move ->bufpos across the gap before we advance it, - the gap never comes between the previous character and ->bufpos. */ - return *(BUF_BEG_ADDR (inbuffer) + XMARKER (readcharfun)->bufpos + return *(BUF_BEG_ADDR (inbuffer) + XMARKER (readcharfun)->bytepos - readchar_backlog--); } if (EQ (readcharfun, Qget_file_char)) -- 2.39.2