Mercurial > emacs
changeset 112207:86a21f19b9e6
* simple.el (shell-command): Don't error out if shell command
buffer contains text with non-nil read-only property when erasing
the buffer.
author | Tassilo Horn <tassilo@member.fsf.org> |
---|---|
date | Thu, 13 Jan 2011 19:58:28 +0100 |
parents | cf323f3bfe7f |
children | f78d631cd428 |
files | lisp/ChangeLog lisp/simple.el |
diffstat | 2 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Thu Jan 13 17:26:40 2011 +0100 +++ b/lisp/ChangeLog Thu Jan 13 19:58:28 2011 +0100 @@ -1,3 +1,9 @@ +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.
--- a/lisp/simple.el Thu Jan 13 17:26:40 2011 +0100 +++ b/lisp/simple.el Thu Jan 13 19:58:28 2011 +0100 @@ -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