From d57f4dde80447f0fcdb1c31df7f0657fd2eea369 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 5 Nov 2013 18:26:11 +0200 Subject: [PATCH] Fix bug #15148 with garbled display in Dired when cache-long-scans is ON. src/callproc.c (call_process): Call prepare_to_modify_buffer before decoding text read from the sub-process, as the decoded stuff will be inserted into the buffer. This will invalidate the various caches maintained for the buffer. --- src/ChangeLog | 7 +++++++ src/callproc.c | 1 + 2 files changed, 8 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 556025fa5bd..e47f6a63740 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2013-11-05 Eli Zaretskii + + * callproc.c (call_process): Call prepare_to_modify_buffer before + decoding text read from the sub-process, as the decoded stuff will + be inserted into the buffer. This will invalidate the various + caches maintained for the buffer. (Bug#15148) + 2013-11-05 Xue Fuqiao * xdisp.c (syms_of_xdisp): Mention the active display table in doc diff --git a/src/callproc.c b/src/callproc.c index 2740779f513..72b9c1dc370 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -822,6 +822,7 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd, ptrdiff_t count1 = SPECPDL_INDEX (); XSETBUFFER (curbuf, current_buffer); + prepare_to_modify_buffer (PT, PT, NULL); /* We cannot allow after-change-functions be run during decoding, because that might modify the buffer, while we rely on process_coding.produced to -- 2.39.2