--- /usr/share/emacs/22.2/lisp/simple.el~ 2009-01-21 15:12:12.502915265 +0000 +++ /usr/share/emacs/22.2/lisp/simple.el 2009-01-22 13:22:17.352984134 +0000 @@ -1889,13 +1889,14 @@ (error "Shell command in progress"))) (with-current-buffer buffer (setq buffer-read-only nil) - (erase-buffer) + (comint-mode) (erase-buffer) (display-buffer buffer) (setq default-directory directory) - (setq proc (start-process "Shell" buffer shell-file-name - shell-command-switch command)) + (setq proc (get-buffer-process + (make-comint-in-buffer + "Shell" buffer shell-file-name nil + shell-command-switch command))) (setq mode-line-process '(":%s")) - (require 'shell) (shell-mode) (set-process-sentinel proc 'shell-command-sentinel) )) (shell-command-on-region (point) (point) command