buffer contains text with non-nil read-only property when erasing
the buffer.
+2011-01-13 Tassilo Horn <tassilo@member.fsf.org>
+
+ * 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 <storm@cua.dk>
* ido.el (ido-may-cache-directory): Move "too-big" check later.
(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