diff options
author | Eli Zaretskii <eliz@gnu.org> | 2009-03-02 21:04:42 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2009-03-02 21:04:42 +0000 |
commit | 71a0c011da89f12b6d921cf8c28eae80ee9f26b7 (patch) | |
tree | cc40f612a2362bae2e8b3de8287d06f1c9af788c /src/callproc.c | |
parent | 5d4cf42aa8518598e5b48ec84f18d02369652e9e (diff) | |
download | emacs-71a0c011da89f12b6d921cf8c28eae80ee9f26b7.tar.gz |
(Fcall_process): Bind inhibit-modification-hooks to t when decoding
process output.
Diffstat (limited to 'src/callproc.c')
-rw-r--r-- | src/callproc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/callproc.c b/src/callproc.c index 316740391ed..d55fe695e76 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -732,10 +732,18 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) else { /* We have to decode the input. */ Lisp_Object curbuf; + int count1 = SPECPDL_INDEX (); XSETBUFFER (curbuf, current_buffer); + /* We cannot allow after-change-functions be run + during decoding, because that might modify the + buffer, while we rely on process_coding.produced to + faithfully reflect inserted text until we + TEMP_SET_PT_BOTH below. */ + specbind (Qinhibit_modification_hooks, Qt); decode_coding_c_string (&process_coding, buf, nread, curbuf); + unbind_to (count1, Qnil); if (display_on_the_fly && CODING_REQUIRE_DETECTION (&saved_coding) && ! CODING_REQUIRE_DETECTION (&process_coding)) |