]> git.eshelyaron.com Git - emacs.git/commitdiff
* src/callproc.c (call_process): Don't check read-only if we don't insert
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 2 Jun 2014 18:42:07 +0000 (14:42 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 2 Jun 2014 18:42:07 +0000 (14:42 -0400)
anything.

Fixes: debbugs:17666
src/ChangeLog
src/callproc.c

index 2e3b465e96eef892263170a921cedfe6ada15661..5759d1555808881ee7f000a05b481f690b8d7abd 100644 (file)
@@ -1,3 +1,8 @@
+2014-06-02  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * callproc.c (call_process): Don't check read-only if we don't insert
+       anything (bug#17666).
+
 2014-06-02  Eli Zaretskii  <eliz@gnu.org>
 
        * dispnew.c (update_frame_with_menu): Set display_completed.
index 9e60ba11bcffaeecc47ed0c1828bb40ae32c95e6..7ba3e398b41e9f6cace04b6175444d68c68d8be7 100644 (file)
@@ -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