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: Mon, 25 Mar 2024 19:12:45 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

>> What these variables are trying to achieve is already possible
>> to do by using a 'category' in 'display-buffer-alist'.
>
> Please proceed as carefully as possible, here might be dragons.

Ok, but before proceeding I propose the following change.
To simplify a complicated lambda condition in

(add-to-list 'display-buffer-alist
             `(,(lambda (_buffer-name action)
                  (eq (alist-get 'category action) 'comint))
               (display-buffer-in-direction)
               (direction . top)))

let's use a symbol instead of the lambda:

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

Then like strings are used as regexp to match a buffer name
symbols will match a category.





reply via email to

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