]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove obsolete 'display-comint-buffer-action' (bug#74361)
authorJuri Linkov <juri@linkov.net>
Wed, 4 Dec 2024 07:40:33 +0000 (09:40 +0200)
committerEshel Yaron <me@eshelyaron.com>
Wed, 4 Dec 2024 17:06:22 +0000 (18:06 +0100)
* 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)

etc/NEWS
lisp/cmuscheme.el
lisp/eshell/eshell.el
lisp/org/ol-eshell.el
lisp/progmodes/inf-lisp.el
lisp/progmodes/project.el
lisp/progmodes/sh-script.el
lisp/shell.el
lisp/textmodes/tex-mode.el
lisp/window.el

index 9985451e3fdbfb03eda0be162aec0b3a97962628..eab59c0ee976d6df1c5cff6d61194f7979274898 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -75,6 +75,12 @@ that the actual killing or burying of the buffer is done by the caller.
 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
 
 +++
index d4316fb11751bacceec936760763258997317de8..b03cf1f1840544e9b9bd42639f777fbf42d5e9a4 100644 (file)
@@ -238,8 +238,8 @@ is run).
        (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.
@@ -359,8 +359,8 @@ With argument, position cursor at end of buffer."
   (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)
index fc08734d5f3511a7965909d194840971f0fd76dc..3def918bdd152df3ce9b3abe76792929f4c1aa1e 100644 (file)
@@ -278,8 +278,8 @@ information on Eshell, see Info node `(eshell)Top'."
                   (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))
index 595dd0ee0f80a338bf6a5e1d51a3627556e1d261..e364a38c17d679a7bf8b2cd95e80ffa544884ecd 100644 (file)
@@ -51,9 +51,9 @@ followed by a colon."
     (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)
index 85fc6b930f598706e3ea63b224fef2c45999b840..b092b3b679c46768d68e4f149606daf8ea6a6fdc 100644 (file)
@@ -308,8 +308,8 @@ quoted using shell quote syntax.
                           "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)
index 2035a63800db9bb96bd2d19ec59072b30418247d..f18c5ed18a07e01e54b40d0062accb7da1c31795 100644 (file)
@@ -1378,7 +1378,8 @@ if one already exists."
          (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)))))
 
@@ -1395,7 +1396,8 @@ if one already exists."
          (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
index 7db892d6e83cbf42af2c545054ff9ee591edf862..505a45de080172d0380d78e9b20010d5a8e98434 100644 (file)
@@ -1447,8 +1447,9 @@ If FORCE is non-nil and no process found, create one."
 (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'."
index f1ed64b0f83f08529e4fc2c8770ea28f4bf83ecb..1ef266e7010554cedf5b331c68a52609ccdf0604 100644 (file)
@@ -948,8 +948,8 @@ Make the shell buffer the current buffer, and return it.
                  (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
index 411b699ad118d5b6b5be6aae21974cda6b40bcbd..65ad12ec5eccc322d4f3ded2595fd44d702e07e5 100644 (file)
@@ -2039,8 +2039,9 @@ In the tex shell buffer this command behaves like `comint-send-input'."
 
 (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)
@@ -2699,9 +2700,10 @@ line LINE of the window, or centered if LINE is nil."
   (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))
index fed94bb8e6cda66a579d4910fc64b1e8e2e87197..8f3e101d34cd515e8463ba053aefae60cf7006d7 100644 (file)
@@ -9069,35 +9069,6 @@ currently selected window; otherwise it will be displayed in
 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.