aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTassilo Horn2011-01-13 19:58:28 +0100
committerTassilo Horn2011-01-13 19:58:28 +0100
commit50f8cd9617d28c0d06103abd1bbbabcb27a9ef94 (patch)
tree7d63b78c68c1748e07a253abd67f88645a508b53
parent821f936d1c04df2f9ccaf6307b220d7cbe0e76c7 (diff)
downloademacs-50f8cd9617d28c0d06103abd1bbbabcb27a9ef94.tar.gz
emacs-50f8cd9617d28c0d06103abd1bbbabcb27a9ef94.zip
* simple.el (shell-command): Don't error out if shell command
buffer contains text with non-nil read-only property when erasing the buffer.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/simple.el6
2 files changed, 11 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index eafb096f499..df39fb29cd7 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12011-01-13 Tassilo Horn <tassilo@member.fsf.org>
2
3 * simple.el (shell-command): Don't error out if shell command
4 buffer contains text with non-nil read-only property when erasing
5 the buffer.
6
12011-01-13 Kim F. Storm <storm@cua.dk> 72011-01-13 Kim F. Storm <storm@cua.dk>
2 8
3 * ido.el (ido-may-cache-directory): Move "too-big" check later. 9 * ido.el (ido-may-cache-directory): Move "too-big" check later.
diff --git a/lisp/simple.el b/lisp/simple.el
index 57ef84882d0..684d98df18e 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2341,7 +2341,11 @@ the use of a shell (with its need to quote arguments)."
2341 (error "Shell command in progress"))) 2341 (error "Shell command in progress")))
2342 (with-current-buffer buffer 2342 (with-current-buffer buffer
2343 (setq buffer-read-only nil) 2343 (setq buffer-read-only nil)
2344 (erase-buffer) 2344 ;; Setting buffer-read-only to nil doesn't suffice
2345 ;; if some text has a non-nil read-only property,
2346 ;; which comint sometimes adds for prompts.
2347 (let ((inhibit-read-only t))
2348 (erase-buffer))
2345 (display-buffer buffer) 2349 (display-buffer buffer)
2346 (setq default-directory directory) 2350 (setq default-directory directory)
2347 (setq proc (start-process "Shell" buffer shell-file-name 2351 (setq proc (start-process "Shell" buffer shell-file-name