summaryrefslogtreecommitdiff
path: root/src/callproc.c
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2014-06-02 14:42:07 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2014-06-02 14:42:07 -0400
commitc4e6b585bbdf26cfbb5b79da216e347e195dc38d (patch)
tree9e2dc0284bf848f5602956256a905a52022be080 /src/callproc.c
parent834dee2099cd30946753bd109f2f47d538575083 (diff)
downloademacs-c4e6b585bbdf26cfbb5b79da216e347e195dc38d.tar.gz
* src/callproc.c (call_process): Don't check read-only if we don't insert
anything. Fixes: debbugs:17666
Diffstat (limited to 'src/callproc.c')
-rw-r--r--src/callproc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/callproc.c b/src/callproc.c
index 9e60ba11bcf..7ba3e398b41 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -826,8 +826,10 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd,
/* Now NREAD is the total amount of data in the buffer. */
immediate_quit = 0;
- if (NILP (BVAR (current_buffer, enable_multibyte_characters))
- && ! CODING_MAY_REQUIRE_DECODING (&process_coding))
+ if (!nread)
+ ;
+ else if (NILP (BVAR (current_buffer, enable_multibyte_characters))
+ && ! CODING_MAY_REQUIRE_DECODING (&process_coding))
insert_1_both (buf, nread, nread, 0, 1, 0);
else
{ /* We have to decode the input. */
@@ -835,6 +837,7 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd,
ptrdiff_t count1 = SPECPDL_INDEX ();
XSETBUFFER (curbuf, current_buffer);
+ /* FIXME: Call signal_after_change! */
prepare_to_modify_buffer (PT, PT, NULL);
/* We cannot allow after-change-functions be run
during decoding, because that might modify the