Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
a3123c13
Commit
a3123c13
authored
Jan 02, 1998
by
Richard M. Stallman
Browse files
(readchar): Use marker's bytepos instead of bufpos.
parent
193b12ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
src/lread.c
src/lread.c
+2
-7
No files found.
src/lread.c
View file @
a3123c13
...
...
@@ -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
)
->
b
ufpos
+=
bytepos
-
orig_
bytepos
;
XMARKER
(
readcharfun
)
->
b
ytepos
=
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
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment