mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-20 12:40:56 -08:00
(encode_coding_object): If a pre-write-conversion
function makes a new buffer, kill it.
This commit is contained in:
parent
63cf84d615
commit
c02d943bc2
1 changed files with 5 additions and 0 deletions
|
|
@ -6887,6 +6887,7 @@ encode_coding_object (coding, src_object, from, from_byte, to, to_byte,
|
|||
Lisp_Object attrs;
|
||||
Lisp_Object buffer;
|
||||
int saved_pt = -1, saved_pt_byte;
|
||||
int kill_src_buffer = 0;
|
||||
|
||||
buffer = Fcurrent_buffer ();
|
||||
|
||||
|
|
@ -6924,6 +6925,8 @@ encode_coding_object (coding, src_object, from, from_byte, to, to_byte,
|
|||
args[2] = make_number (Z);
|
||||
safe_call (3, args);
|
||||
}
|
||||
if (XBUFFER (coding->src_object) != current_buffer)
|
||||
kill_src_buffer = 1;
|
||||
coding->src_object = Fcurrent_buffer ();
|
||||
if (BEG != GPT)
|
||||
move_gap_both (BEG, BEG_BYTE);
|
||||
|
|
@ -7026,6 +7029,8 @@ encode_coding_object (coding, src_object, from, from_byte, to, to_byte,
|
|||
saved_pt_byte + (coding->produced - bytes));
|
||||
}
|
||||
|
||||
if (kill_src_buffer)
|
||||
Fkill_buffer (coding->src_object);
|
||||
unbind_to (count, Qnil);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue