]> git.eshelyaron.com Git - emacs.git/commitdiff
(shell-command): Set asynchronous process filter to
authorJuri Linkov <juri@jurta.org>
Thu, 10 Sep 2009 00:54:36 +0000 (00:54 +0000)
committerJuri Linkov <juri@jurta.org>
Thu, 10 Sep 2009 00:54:36 +0000 (00:54 +0000)
`comint-output-filter'.  (Bug#4343)

lisp/simple.el

index 6ec2e92dac29258658c513bcceda4b159076b6d7..c3e7c49e194433aa0e057f8ca6d03a8a050cd6fa 100644 (file)
@@ -2214,7 +2214,11 @@ specifies the value of ERROR-BUFFER."
                  (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)))))))