GNU bug report logs -
#69983
Use category for display-buffer-alist
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Sun, 24 Mar 2024 17:22:01 UTC
Severity: normal
Fixed in version 30.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>> 'display-comint-buffer-action' and 'display-tex-shell-buffer-action'
>> are out of place in window.el, and they are redundant per se.
>>
>> What these variables are trying to achieve is already possible
>> to do by using a 'category' in 'display-buffer-alist'.
>>
>> Or we need to keep backward-compatibility? Then the first step
>> to deprecate there variables would be something like this:
>
> Please proceed as carefully as possible, here might be dragons.
Ok, here is a complete patch:
diff --git a/lisp/window.el b/lisp/window.el
index 3867f6fa6ef..29e7310958b 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -8923,7 +8923,8 @@ pop-to-buffer-same-window
another window."
(pop-to-buffer buffer display-buffer--same-window-action norecord))
-(defcustom display-comint-buffer-action display-buffer--same-window-action
+(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
@@ -8931,8 +8932,14 @@ display-comint-buffer-action
: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))
+ (inhibit-same-window . t)
+ (category . tex-shell))
"`display-buffer' action for displaying TeX shell buffers."
:type display-buffer--action-custom-type
:risky t
@@ -8940,6 +8947,11 @@ display-tex-shell-buffer-action
: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")
+
(defun read-buffer-to-switch (prompt)
"Read the name of a buffer to switch to, prompting with PROMPT.
Return the name of the buffer as a string.
This bug report was last modified 1 year and 83 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.