emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r102833: * simple.el (shell-command):


From: Tassilo Horn
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r102833: * simple.el (shell-command): Don't error out if shell command
Date: Thu, 13 Jan 2011 19:58:28 +0100
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 102833
committer: Tassilo Horn <address@hidden>
branch nick: trunk
timestamp: Thu 2011-01-13 19:58:28 +0100
message:
  * simple.el (shell-command): Don't error out if shell command
  buffer contains text with non-nil read-only property when erasing
  the buffer.
modified:
  lisp/ChangeLog
  lisp/simple.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-01-13 16:26:40 +0000
+++ b/lisp/ChangeLog    2011-01-13 18:58:28 +0000
@@ -1,3 +1,9 @@
+2011-01-13  Tassilo Horn  <address@hidden>
+
+       * simple.el (shell-command): Don't error out if shell command
+       buffer contains text with non-nil read-only property when erasing
+       the buffer.
+
 2011-01-13  Kim F. Storm  <address@hidden>
 
        * ido.el (ido-may-cache-directory): Move "too-big" check later.

=== modified file 'lisp/simple.el'
--- a/lisp/simple.el    2011-01-13 04:23:41 +0000
+++ b/lisp/simple.el    2011-01-13 18:58:28 +0000
@@ -2341,7 +2341,11 @@
                      (error "Shell command in progress")))
                (with-current-buffer buffer
                  (setq buffer-read-only nil)
-                 (erase-buffer)
+                 ;; Setting buffer-read-only to nil doesn't suffice
+                 ;; if some text has a non-nil read-only property,
+                 ;; which comint sometimes adds for prompts.
+                 (let ((inhibit-read-only t))
+                   (erase-buffer))
                  (display-buffer buffer)
                  (setq default-directory directory)
                  (setq proc (start-process "Shell" buffer shell-file-name


reply via email to

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