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
fe905025
Commit
fe905025
authored
Jan 23, 2004
by
Kenichi Handa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Fmd5): If OBJECT is a buffer different from the current
one, set buffer to OBJECT temporarily.
parent
fe722d76
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
3 deletions
+19
-3
src/ChangeLog
src/ChangeLog
+5
-0
src/fns.c
src/fns.c
+14
-3
No files found.
src/ChangeLog
View file @
fe905025
2004-01-23 Kenichi Handa <handa@m17n.org>
* fns.c (Fmd5): If OBJECT is a buffer different from the current
one, set buffer to OBJECT temporarily.
2004-01-21 Stefan Monnier <monnier@iro.umontreal.ca>
* keyboard.c (kbd_buffer_gcpro): Remove.
...
...
src/fns.c
View file @
fe905025
...
...
@@ -5454,12 +5454,18 @@ guesswork fails. Normally, an error is signaled in such case. */)
}
else
{
struct buffer *prev = current_buffer;
record_unwind_protect (Fset_buffer, Fcurrent_buffer ());
CHECK_BUFFER (object);
bp = XBUFFER (object);
if (bp != current_buffer)
set_buffer_internal (bp);
if (NILP (start))
b
=
B
UF_BEGV
(
bp
)
;
b = B
EGV
;
else
{
CHECK_NUMBER_COERCE_MARKER (start);
...
...
@@ -5467,7 +5473,7 @@ guesswork fails. Normally, an error is signaled in such case. */)
}
if (NILP (end))
e
=
BUF_ZV
(
bp
)
;
e =
ZV
;
else
{
CHECK_NUMBER_COERCE_MARKER (end);
...
...
@@ -5477,7 +5483,7 @@ guesswork fails. Normally, an error is signaled in such case. */)
if (b > e)
temp = b, b = e, e = temp;
if
(
!
(
B
UF_BEGV
(
bp
)
<=
b
&&
e
<=
BUF_ZV
(
bp
)
))
if (!(B
EGV
<= b && e <=
ZV
))
args_out_of_range (start, end);
if (NILP (coding_system))
...
...
@@ -5544,6 +5550,11 @@ guesswork fails. Normally, an error is signaled in such case. */)
}
object = make_buffer_string (b, e, 0);
if (prev != current_buffer)
set_buffer_internal (prev);
/* Discard the unwind protect for recovering the current
buffer. */
specpdl_ptr--;
if (STRING_MULTIBYTE (object))
object = code_convert_string1 (object, coding_system, Qnil, 1);
...
...
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