bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#69983: Use category for display-buffer-alist


From: Juri Linkov
Subject: bug#69983: Use category for display-buffer-alist
Date: Wed, 27 Mar 2024 09:15:19 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

>> Ok, but before proceeding I propose the following change.
>
> Would this imply a change in 'buffer-match-p'?

Indeed, here it a simple change in 'buffer-match-p'
that will support this case:

(add-to-list 'display-buffer-alist
             `((category . comint)
               (display-buffer-in-direction)
               (direction . top)))

(display-buffer (get-buffer-create "blablabla")
                '(nil (category . comint)))

diff --git a/lisp/subr.el b/lisp/subr.el
index b68aa073ba0..2d104c545f0 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -7502,6 +7502,8 @@ buffer-match-p
                               (push condition buffer-match-p--past-warnings))
                             (apply condition buffer-or-name
                                    (if args nil '(nil)))))))
+                      (`(category . ,category)
+                       (eq (alist-get 'category (car args)) category))
                       (`(major-mode . ,mode)
                        (eq
                         (buffer-local-value 'major-mode buffer)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]