aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorDmitry Gutov2024-06-11 21:02:57 +0300
committerDmitry Gutov2024-06-11 21:03:19 +0300
commit3199b8584e4583a4b74263f5704a21c3431658c2 (patch)
tree408c630a251d4865c83bd48af0d22ba94807eee3 /src/process.c
parent5ecff95993d5edbffb27e14c2815d2b23003bcb4 (diff)
downloademacs-3199b8584e4583a4b74263f5704a21c3431658c2.tar.gz
emacs-3199b8584e4583a4b74263f5704a21c3431658c2.zip
read_and_insert_process_output: Insert before markers
* src/insdel.c (adjust_markers_for_insert): Make non-static. * src/lisp.h: Add declaration for it. * src/process.c (read_and_insert_process_output): Use it here. And also call insert_1_both with BEFORE_MARKERS=t, for compatibility with internal-default-process-filter (bug#66020).
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/process.c b/src/process.c
index 43a02affa90..eb526311c53 100644
--- a/src/process.c
+++ b/src/process.c
@@ -6406,7 +6406,7 @@ 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 insert_1_both (buf, nread, nread, 0, 0, 0); 6409 insert_1_both (buf, nread, nread, 0, 0, 1);
6410 signal_after_change (PT - nread, 0, nread); 6410 signal_after_change (PT - nread, 0, nread);
6411 } 6411 }
6412 else 6412 else
@@ -6423,6 +6423,9 @@ read_and_insert_process_output (struct Lisp_Process *p, char *buf,
6423 specbind (Qinhibit_modification_hooks, Qt); 6423 specbind (Qinhibit_modification_hooks, Qt);
6424 decode_coding_c_string (process_coding, 6424 decode_coding_c_string (process_coding,
6425 (unsigned char *) buf, nread, curbuf); 6425 (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);
6426 unbind_to (count1, Qnil); 6429 unbind_to (count1, Qnil);
6427 6430
6428 read_process_output_set_last_coding_system (p, process_coding); 6431 read_process_output_set_last_coding_system (p, process_coding);