diff options
| author | Juri Linkov | 2022-01-11 19:19:37 +0200 |
|---|---|---|
| committer | Juri Linkov | 2022-01-11 19:19:37 +0200 |
| commit | 4765487d5d24fc8a2a06c329dc9cc3bed9803391 (patch) | |
| tree | a38152d33d4c7e618f667b9de83790d802c8557e | |
| parent | a18517f619bddbe23e6a91ef9dbec360d2b3447e (diff) | |
| download | emacs-4765487d5d24fc8a2a06c329dc9cc3bed9803391.tar.gz emacs-4765487d5d24fc8a2a06c329dc9cc3bed9803391.zip | |
More fixes for display-comint-buffer-action
* lisp/window.el (display-comint-buffer-action):
Use display-buffer--same-window-action as the default value.
* lisp/progmodes/sh-script.el (sh-show-shell):
* lisp/shell.el (shell): Add display-comint-buffer-action to pop-to-buffer.
* lisp/progmodes/project.el (project-shell, project-eshell): Use
`bound-and-true-p display-comint-buffer-action' for backward-compatibility.
https://lists.gnu.org/archive/html/emacs-devel/2021-12/msg02964.html
| -rw-r--r-- | lisp/progmodes/project.el | 4 | ||||
| -rw-r--r-- | lisp/progmodes/sh-script.el | 2 | ||||
| -rw-r--r-- | lisp/shell.el | 2 | ||||
| -rw-r--r-- | lisp/window.el | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index eda19c46a37..c812f28c1bb 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el | |||
| @@ -1017,7 +1017,7 @@ if one already exists." | |||
| 1017 | (default-project-shell-name (project-prefixed-buffer-name "shell")) | 1017 | (default-project-shell-name (project-prefixed-buffer-name "shell")) |
| 1018 | (shell-buffer (get-buffer default-project-shell-name))) | 1018 | (shell-buffer (get-buffer default-project-shell-name))) |
| 1019 | (if (and shell-buffer (not current-prefix-arg)) | 1019 | (if (and shell-buffer (not current-prefix-arg)) |
| 1020 | (pop-to-buffer shell-buffer display-comint-buffer-action) | 1020 | (pop-to-buffer shell-buffer (bound-and-true-p display-comint-buffer-action)) |
| 1021 | (shell (generate-new-buffer-name default-project-shell-name))))) | 1021 | (shell (generate-new-buffer-name default-project-shell-name))))) |
| 1022 | 1022 | ||
| 1023 | ;;;###autoload | 1023 | ;;;###autoload |
| @@ -1033,7 +1033,7 @@ if one already exists." | |||
| 1033 | (eshell-buffer-name (project-prefixed-buffer-name "eshell")) | 1033 | (eshell-buffer-name (project-prefixed-buffer-name "eshell")) |
| 1034 | (eshell-buffer (get-buffer eshell-buffer-name))) | 1034 | (eshell-buffer (get-buffer eshell-buffer-name))) |
| 1035 | (if (and eshell-buffer (not current-prefix-arg)) | 1035 | (if (and eshell-buffer (not current-prefix-arg)) |
| 1036 | (pop-to-buffer eshell-buffer display-comint-buffer-action) | 1036 | (pop-to-buffer eshell-buffer (bound-and-true-p display-comint-buffer-action)) |
| 1037 | (eshell t)))) | 1037 | (eshell t)))) |
| 1038 | 1038 | ||
| 1039 | ;;;###autoload | 1039 | ;;;###autoload |
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index e0d597d89de..ba86ceb0eda 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el | |||
| @@ -1407,7 +1407,7 @@ If FORCE is non-nil and no process found, create one." | |||
| 1407 | (defun sh-show-shell () | 1407 | (defun sh-show-shell () |
| 1408 | "Pop the shell interaction buffer." | 1408 | "Pop the shell interaction buffer." |
| 1409 | (interactive) | 1409 | (interactive) |
| 1410 | (pop-to-buffer (process-buffer (sh-shell-process t)))) | 1410 | (pop-to-buffer (process-buffer (sh-shell-process t)) display-comint-buffer-action)) |
| 1411 | 1411 | ||
| 1412 | (defun sh-send-text (text) | 1412 | (defun sh-send-text (text) |
| 1413 | "Send the text to the `sh-shell-process'." | 1413 | "Send the text to the `sh-shell-process'." |
diff --git a/lisp/shell.el b/lisp/shell.el index dcb6bea0421..c0a82bca183 100644 --- a/lisp/shell.el +++ b/lisp/shell.el | |||
| @@ -758,7 +758,7 @@ Make the shell buffer the current buffer, and return it. | |||
| 758 | (current-buffer))) | 758 | (current-buffer))) |
| 759 | ;; The buffer's window must be correctly set when we call comint | 759 | ;; The buffer's window must be correctly set when we call comint |
| 760 | ;; (so that comint sets the COLUMNS env var properly). | 760 | ;; (so that comint sets the COLUMNS env var properly). |
| 761 | (pop-to-buffer buffer) | 761 | (pop-to-buffer buffer display-comint-buffer-action) |
| 762 | 762 | ||
| 763 | (with-connection-local-variables | 763 | (with-connection-local-variables |
| 764 | ;; On remote hosts, the local `shell-file-name' might be useless. | 764 | ;; On remote hosts, the local `shell-file-name' might be useless. |
diff --git a/lisp/window.el b/lisp/window.el index dc5f5b98e1c..0d8e1813ab1 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -7474,7 +7474,7 @@ ALIST. See `display-buffer' for details." | |||
| 7474 | :version "24.1" | 7474 | :version "24.1" |
| 7475 | :group 'windows) | 7475 | :group 'windows) |
| 7476 | 7476 | ||
| 7477 | (defcustom display-comint-buffer-action '((display-buffer-same-window)) | 7477 | (defcustom display-comint-buffer-action display-buffer--same-window-action |
| 7478 | "`display-buffer' action for displaying comint buffers." | 7478 | "`display-buffer' action for displaying comint buffers." |
| 7479 | :type display-buffer--action-custom-type | 7479 | :type display-buffer--action-custom-type |
| 7480 | :risky t | 7480 | :risky t |