aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/process.c b/src/process.c
index eb526311c53..58d9f8162df 100644
--- a/src/process.c
+++ b/src/process.c
@@ -6406,6 +6406,9 @@ read_and_insert_process_output (struct Lisp_Process *p, char *buf,
6406 if (NILP (BVAR (XBUFFER (p->buffer), enable_multibyte_characters)) 6406 if (NILP (BVAR (XBUFFER (p->buffer), enable_multibyte_characters))
6407 && ! CODING_MAY_REQUIRE_DECODING (process_coding)) 6407 && ! CODING_MAY_REQUIRE_DECODING (process_coding))
6408 { 6408 {
6409 /* For compatibility with the long-standing behavior of
6410 internal-default-process-filter we insert before markers,
6411 both here and in the 'else' branch. */
6409 insert_1_both (buf, nread, nread, 0, 0, 1); 6412 insert_1_both (buf, nread, nread, 0, 0, 1);
6410 signal_after_change (PT - nread, 0, nread); 6413 signal_after_change (PT - nread, 0, nread);
6411 } 6414 }
@@ -6415,6 +6418,7 @@ read_and_insert_process_output (struct Lisp_Process *p, char *buf,
6415 specpdl_ref count1 = SPECPDL_INDEX (); 6418 specpdl_ref count1 = SPECPDL_INDEX ();
6416 6419
6417 XSETBUFFER (curbuf, current_buffer); 6420 XSETBUFFER (curbuf, current_buffer);
6421 process_coding->insert_before_markers = true;
6418 /* We cannot allow after-change-functions be run 6422 /* We cannot allow after-change-functions be run
6419 during decoding, because that might modify the 6423 during decoding, because that might modify the
6420 buffer, while we rely on process_coding.produced to 6424 buffer, while we rely on process_coding.produced to
@@ -6423,9 +6427,6 @@ read_and_insert_process_output (struct Lisp_Process *p, char *buf,
6423 specbind (Qinhibit_modification_hooks, Qt); 6427 specbind (Qinhibit_modification_hooks, Qt);
6424 decode_coding_c_string (process_coding, 6428 decode_coding_c_string (process_coding,
6425 (unsigned char *) buf, nread, curbuf); 6429 (unsigned char *) buf, nread, curbuf);
6426 adjust_markers_for_insert (PT, PT_BYTE,
6427 PT + process_coding->produced_char,
6428 PT_BYTE + process_coding->produced, true);
6429 unbind_to (count1, Qnil); 6430 unbind_to (count1, Qnil);
6430 6431
6431 read_process_output_set_last_coding_system (p, process_coding); 6432 read_process_output_set_last_coding_system (p, process_coding);