changeset 104897:d7e64be6966a

(shell-command): Set asynchronous process filter to `comint-output-filter'. (Bug#4343)
author Juri Linkov <juri@jurta.org>
date Thu, 10 Sep 2009 00:54:36 +0000
parents add40a32098b
children 5c11b1241dc1
files lisp/simple.el
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Thu Sep 10 00:54:15 2009 +0000
+++ b/lisp/simple.el	Thu Sep 10 00:54:36 2009 +0000
@@ -2214,7 +2214,11 @@
 		  (setq mode-line-process '(":%s"))
 		  (require 'shell) (shell-mode)
 		  (set-process-sentinel proc 'shell-command-sentinel)
+		  ;; Use the comint filter for proper handling of carriage motion
+		  ;; (see `comint-inhibit-carriage-motion'),.
+		  (set-process-filter proc 'comint-output-filter)
 		  ))
+	    ;; Otherwise, command is executed synchronously.
 	    (shell-command-on-region (point) (point) command
 				     output-buffer nil error-buffer)))))))