emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-24 r117196: * src/callproc.c (call_process): Don't c


From: Stefan Monnier
Subject: [Emacs-diffs] emacs-24 r117196: * src/callproc.c (call_process): Don't check read-only if we don't insert
Date: Mon, 02 Jun 2014 18:42:12 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117196
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17666
committer: Stefan Monnier <address@hidden>
branch nick: emacs-24
timestamp: Mon 2014-06-02 14:42:07 -0400
message:
  * src/callproc.c (call_process): Don't check read-only if we don't insert
  anything.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/callproc.c                 callproc.c-20091113204419-o5vbwnq5f7feedwu-248
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-06-02 16:53:02 +0000
+++ b/src/ChangeLog     2014-06-02 18:42:07 +0000
@@ -1,3 +1,8 @@
+2014-06-02  Stefan Monnier  <address@hidden>
+
+       * callproc.c (call_process): Don't check read-only if we don't insert
+       anything (bug#17666).
+
 2014-06-02  Eli Zaretskii  <address@hidden>
 
        * dispnew.c (update_frame_with_menu): Set display_completed.

=== modified file 'src/callproc.c'
--- a/src/callproc.c    2014-04-16 13:27:28 +0000
+++ b/src/callproc.c    2014-06-02 18:42:07 +0000
@@ -826,8 +826,10 @@
          /* 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 @@
              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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]