Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
85cac557
Commit
85cac557
authored
Mar 17, 1998
by
Richard M. Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Fchar_after, Fchar_before): Properly check arg type
and whether in range, for all cases. (Fsave_excursion): Doc fix.
parent
f405b38d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
11 deletions
+24
-11
src/editfns.c
src/editfns.c
+24
-11
No files found.
src/editfns.c
View file @
85cac557
...
...
@@ -380,7 +380,12 @@ DEFUN ("save-excursion", Fsave_excursion, Ssave_excursion, 0, UNEVALLED, 0,
Executes BODY just like `progn'.
\n
\
The values of point, mark and the current buffer are restored
\n
\
even in case of abnormal exit (throw or error).
\n
\
The state of activation of the mark is also restored."
)
The state of activation of the mark is also restored.
\n
\
\n
\
This construct does not save `deactivate-mark', and therefore
\n
\
functions that change the buffer will still cause deactivation
\n
\
of the mark at the end of the command. To prevent that, bind
\n
\
`deactivate-mark' with `let'."
)
(
args
)
Lisp_Object
args
;
{
...
...
@@ -555,20 +560,22 @@ If `enable-multibyte-characters' is nil or POS is not at character boundary,\n\
register
Lisp_Object
val
;
if
(
NILP
(
pos
))
return
make_number
(
FETCH_CHAR
(
PT_BYTE
));
if
(
MARKERP
(
pos
))
pos_byte
=
marker_byte_position
(
pos
);
pos_byte
=
PT_BYTE
;
else
if
(
MARKERP
(
pos
))
{
pos_byte
=
marker_byte_position
(
pos
);
if
(
pos_byte
<
BEGV_BYTE
||
pos_byte
>=
ZV_BYTE
)
return
Qnil
;
}
else
{
CHECK_NUMBER_COERCE_MARKER
(
pos
,
0
);
if
(
pos
<
BEGV
||
pos
>=
ZV
)
return
Qnil
;
pos_byte
=
CHAR_TO_BYTE
(
XINT
(
pos
));
}
if
(
pos_byte
<
BEGV_BYTE
||
pos_byte
>=
ZV_BYTE
)
return
Qnil
;
return
make_number
(
FETCH_CHAR
(
pos_byte
));
}
...
...
@@ -588,13 +595,19 @@ is returned as a character.")
if
(
NILP
(
pos
))
pos_byte
=
PT_BYTE
;
else
if
(
MARKERP
(
pos
))
pos_byte
=
marker_byte_position
(
pos
);
else
if
(
pos
<=
BEGV
||
pos
>
ZV
)
return
Qnil
;
{
pos_byte
=
marker_byte_position
(
pos
);
if
(
pos_byte
<=
BEGV_BYTE
||
pos_byte
>
ZV_BYTE
)
return
Qnil
;
}
else
{
CHECK_NUMBER_COERCE_MARKER
(
pos
,
0
);
if
(
pos
<=
BEGV
||
pos
>
ZV
)
return
Qnil
;
pos_byte
=
CHAR_TO_BYTE
(
XINT
(
pos
));
}
...
...
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