diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2020-02-10 19:59:49 +0100 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2020-02-10 19:59:49 +0100 |
commit | 2e2f53907103d801fb57dc0eef55906cdf4d791b (patch) | |
tree | c8074ef822e8c18ab90983d1d62798acd3451982 /lisp/net | |
parent | 79355517f158d03918433a5b4e74fd803b693c28 (diff) | |
download | emacs-2e2f53907103d801fb57dc0eef55906cdf4d791b.tar.gz |
Fix window position in Tramp's shell-command
* lisp/net/tramp.el (tramp-handle-shell-command): Fix `window-start'
in output buffer. (Bug#39171)
Diffstat (limited to 'lisp/net')
-rw-r--r-- | lisp/net/tramp.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 19d36c3a97b..0e44656f2a4 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3721,9 +3721,9 @@ support symbolic links." (if (process-live-p p) ;; Display output. (with-current-buffer output-buffer - (display-buffer output-buffer '(nil (allow-no-window . t))) (setq mode-line-process '(":%s")) - (shell-mode) + (unless (eq major-mode 'shell-mode) + (shell-mode)) (set-process-filter p #'comint-output-filter) (set-process-sentinel p #'shell-command-sentinel) (when error-file @@ -3733,7 +3733,8 @@ support symbolic links." (with-current-buffer error-buffer (insert-file-contents-literally error-file nil nil nil 'replace)) - (delete-file error-file))))) + (delete-file error-file)))) + (display-buffer output-buffer '(nil (allow-no-window . t)))) (when error-file (delete-file error-file))))) |