* lisp/window.el (display-comint-buffer-action):
(display-tex-shell-buffer-action):
Remove obsolete defcustoms.
* lisp/cmuscheme.el (run-scheme, switch-to-scheme):
* lisp/shell.el (shell):
* lisp/eshell/eshell.el (eshell):
* lisp/progmodes/inf-lisp.el (inferior-lisp):
* lisp/progmodes/project.el (project-shell, project-eshell):
* lisp/progmodes/sh-script.el (sh-show-shell):
Replace 'display-comint-buffer-action' with a list of
'display-buffer--same-window-action' and '(category . comint)'.
* lisp/org/ol-eshell.el (org-eshell-open): Add '(category . comint)'.
* lisp/textmodes/tex-mode.el (tex-display-shell)
(tex-recenter-output-buffer):
Replace 'display-tex-shell-buffer-action' with a list of
'display-buffer-in-previous-window' and '(category . tex-shell)'.
(cherry picked from commit
d706be4b345f3e2d242c4f2ffb5e566845b2935d)
With this option set, 'quit-restore-window' will delete its window more
aggressively rather than switching to some other buffer in it.
+---
+*** The user option 'display-comint-buffer-action' has been removed.
+It has been obsolete since Emacs 30.1. Use '(category . comint)' instead.
+Another user option 'display-tex-shell-buffer-action' has been removed too
+for which you can use '(category . tex-shell)'.
+
** Frames
+++
(inferior-scheme-mode)))
(setq scheme-program-name cmd)
(setq scheme-buffer "*scheme*")
- (with-suppressed-warnings ((obsolete display-comint-buffer-action))
- (pop-to-buffer "*scheme*" display-comint-buffer-action)))
+ (pop-to-buffer "*scheme*" (append display-buffer--same-window-action
+ '((category . comint)))))
(defun scheme-start-file (prog)
"Return the name of the start file corresponding to PROG.
(interactive "P")
(if (or (and scheme-buffer (get-buffer scheme-buffer))
(scheme-interactively-start-process))
- (with-suppressed-warnings ((obsolete display-comint-buffer-action))
- (pop-to-buffer scheme-buffer display-comint-buffer-action))
+ (pop-to-buffer scheme-buffer (append display-buffer--same-window-action
+ '((category . comint))))
(error "No current process buffer. See variable `scheme-buffer'"))
(when eob-p
(push-mark)
(t
(get-buffer-create eshell-buffer-name)))))
(cl-assert (and buf (buffer-live-p buf)))
- (with-suppressed-warnings ((obsolete display-comint-buffer-action))
- (pop-to-buffer buf display-comint-buffer-action))
+ (pop-to-buffer buf (append display-buffer--same-window-action
+ '((category . comint))))
(unless (derived-mode-p 'eshell-mode)
(eshell-mode))
buf))
(if (get-buffer eshell-buffer-name)
(pop-to-buffer
eshell-buffer-name
- (if (boundp 'display-comint-buffer-action) ; Emacs >= 29
+ (if (boundp 'display-comint-buffer-action) ; Emacs >= 29, <= 30
display-comint-buffer-action
- '(display-buffer-same-window (inhibit-same-window))))
+ '(display-buffer-same-window (inhibit-same-window) (category . comint))))
(eshell))
(goto-char (point-max))
(eshell-kill-input)
"inferior-lisp" (car cmdlist) nil (cdr cmdlist)))
(inferior-lisp-mode)))
(setq inferior-lisp-buffer "*inferior-lisp*")
- (with-suppressed-warnings ((obsolete display-comint-buffer-action))
- (pop-to-buffer "*inferior-lisp*" display-comint-buffer-action)))
+ (pop-to-buffer "*inferior-lisp*" (append display-buffer--same-window-action
+ '((category . comint)))))
;;;###autoload
(defalias 'run-lisp 'inferior-lisp)
(shell-buffer (get-buffer default-project-shell-name)))
(if (and shell-buffer (not current-prefix-arg))
(if (comint-check-proc shell-buffer)
- (pop-to-buffer shell-buffer (bound-and-true-p display-comint-buffer-action))
+ (pop-to-buffer shell-buffer (append display-buffer--same-window-action
+ '((category . comint))))
(shell shell-buffer))
(shell (generate-new-buffer-name default-project-shell-name)))))
(eshell-buffer-name (project-prefixed-buffer-name "eshell"))
(eshell-buffer (get-buffer eshell-buffer-name)))
(if (and eshell-buffer (not current-prefix-arg))
- (pop-to-buffer eshell-buffer (bound-and-true-p display-comint-buffer-action))
+ (pop-to-buffer eshell-buffer (append display-buffer--same-window-action
+ '((category . comint))))
(eshell t))))
;;;###autoload
(defun sh-show-shell ()
"Pop the shell interaction buffer."
(interactive)
- (with-suppressed-warnings ((obsolete display-comint-buffer-action))
- (pop-to-buffer (process-buffer (sh-shell-process t)) display-comint-buffer-action)))
+ (pop-to-buffer (process-buffer (sh-shell-process t))
+ (append display-buffer--same-window-action
+ '((category . comint)))))
(defun sh-send-text (text)
"Send TEXT to `sh-shell-process'."
(current-buffer)))
;; The buffer's window must be correctly set when we call comint
;; (so that comint sets the COLUMNS env var properly).
- (with-suppressed-warnings ((obsolete display-comint-buffer-action))
- (pop-to-buffer buffer display-comint-buffer-action))
+ (pop-to-buffer buffer (append display-buffer--same-window-action
+ '((category . comint))))
(with-connection-local-variables
(when file-name
(defun tex-display-shell ()
"Make the TeX shell buffer visible in a window."
- (with-suppressed-warnings ((obsolete display-tex-shell-buffer-action))
- (display-buffer (tex-shell-buf) display-tex-shell-buffer-action))
+ (display-buffer (tex-shell-buf) '(display-buffer-in-previous-window
+ (inhibit-same-window . t)
+ (category . tex-shell)))
(tex-recenter-output-buffer nil))
(defun tex-shell-sentinel (proc _msg)
(let ((tex-shell (get-buffer "*tex-shell*")))
(if (null tex-shell)
(message "No TeX output buffer")
- (when-let ((window
- (with-suppressed-warnings ((obsolete display-tex-shell-buffer-action))
- (display-buffer tex-shell display-tex-shell-buffer-action))))
+ (when-let* ((window
+ (display-buffer tex-shell '(display-buffer-in-previous-window
+ (inhibit-same-window . t)
+ (category . tex-shell)))))
(with-selected-window window
(bury-buffer tex-shell)
(goto-char (point-max))
another window."
(pop-to-buffer buffer display-buffer--same-window-action norecord))
-(defcustom display-comint-buffer-action
- (append display-buffer--same-window-action '((category . comint)))
- "`display-buffer' action for displaying comint buffers."
- :type display-buffer--action-custom-type
- :risky t
- :version "29.1"
- :group 'windows
- :group 'comint)
-
-(make-obsolete-variable
- 'display-comint-buffer-action
- "use a `(category . comint)' condition in `display-buffer-alist'."
- "30.1")
-
-(defcustom display-tex-shell-buffer-action '(display-buffer-in-previous-window
- (inhibit-same-window . t)
- (category . tex-shell))
- "`display-buffer' action for displaying TeX shell buffers."
- :type display-buffer--action-custom-type
- :risky t
- :version "29.1"
- :group 'windows
- :group 'tex-run)
-
-(make-obsolete-variable
- 'display-tex-shell-buffer-action
- "use a `(category . tex-shell)' condition in `display-buffer-alist'."
- "30.1")
-
(defvar read-buffer-to-switch-current-buffer nil
"Buffer that `read-buffer-to-switch' ignores as a completion candidate.