diff options
| author | Dmitry Gutov | 2024-06-01 18:03:42 +0300 |
|---|---|---|
| committer | Dmitry Gutov | 2024-06-01 18:03:42 +0300 |
| commit | a154f0aa73bceeaaeefcd243e7db9d09e3f450d7 (patch) | |
| tree | 4708f1f9e80eaff35cddb7bdc09d18948d014166 /lisp/net | |
| parent | d91ad9be5a72974784e0552069020c3ae0bc830e (diff) | |
| download | emacs-a154f0aa73bceeaaeefcd243e7db9d09e3f450d7.tar.gz emacs-a154f0aa73bceeaaeefcd243e7db9d09e3f450d7.zip | |
shell-command-mode: New major mode for async-shell-command
* etc/NEWS: Mention the additions.
* lisp/shell.el (shell-command-mode): New major mode (bug#71049).
* lisp/simple.el (async-shell-command-mode):
New variable, with default value pointing to that mode.
(shell-command): Refer to it here.
(async-shell-command): Update docstring.
* lisp/net/tramp.el (tramp-handle-shell-command):
Use the new variable when available.
Diffstat (limited to 'lisp/net')
| -rw-r--r-- | lisp/net/tramp.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index b2442f4538c..3dffe7544ab 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -5259,8 +5259,13 @@ support symbolic links." | |||
| 5259 | ;; Display output. | 5259 | ;; Display output. |
| 5260 | (with-current-buffer output-buffer | 5260 | (with-current-buffer output-buffer |
| 5261 | (setq mode-line-process '(":%s")) | 5261 | (setq mode-line-process '(":%s")) |
| 5262 | (unless (eq major-mode 'shell-mode) | 5262 | (cond |
| 5263 | (shell-mode)) | 5263 | ((boundp 'async-shell-command-mode) |
| 5264 | ;; Emacs 30+ | ||
| 5265 | (unless (eq major-mode async-shell-command-mode) | ||
| 5266 | (funcall async-shell-command-mode))) | ||
| 5267 | ((not (eq major-mode 'shell-mode)) | ||
| 5268 | (shell-mode))) | ||
| 5264 | (set-process-filter p #'comint-output-filter) | 5269 | (set-process-filter p #'comint-output-filter) |
| 5265 | (set-process-sentinel p #'shell-command-sentinel) | 5270 | (set-process-sentinel p #'shell-command-sentinel) |
| 5266 | (when error-file | 5271 | (when error-file |