From: Eli Zaretskii Date: Mon, 2 Mar 2009 21:04:42 +0000 (+0000) Subject: (Fcall_process): Bind inhibit-modification-hooks to t when decoding X-Git-Tag: emacs-pretest-23.0.92~381 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=71a0c011da89f12b6d921cf8c28eae80ee9f26b7;p=emacs.git (Fcall_process): Bind inhibit-modification-hooks to t when decoding process output. --- diff --git a/src/ChangeLog b/src/ChangeLog index ba9168911a6..3af2b81e191 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-03-02 Eli Zaretskii + + * callproc.c (Fcall_process): Bind inhibit-modification-hooks to t + when decoding process output. + 2009-03-01 Richard M Stallman * m/mips.h (DATA_SEG_BITS, XUINT, XSET): Definitions disabled. 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))