mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
fix(popup): overaggressive ignoring of popup rules
Would cause errors in some legitimate cases where we want display-buffer-alist respected.
This commit is contained in:
@ -50,15 +50,14 @@ to this commmand."
|
|||||||
(+popup/close nil 'force))))
|
(+popup/close nil 'force))))
|
||||||
(global-set-key [remap quit-window] #'+popup/quit-window)
|
(global-set-key [remap quit-window] #'+popup/quit-window)
|
||||||
|
|
||||||
(defadvice! +popup-override-display-buffer-alist-a (orig-fn buffer-or-name &optional action norecord)
|
(defadvice! +popup-override-display-buffer-alist-a (orig-fn &rest args)
|
||||||
"When `pop-to-buffer' is called with non-nil ACTION, that ACTION should
|
"When `pop-to-buffer' is called with non-nil ACTION, that ACTION should
|
||||||
override `display-buffer-alist'."
|
override `display-buffer-alist'."
|
||||||
:around #'pop-to-buffer
|
:around #'switch-to-buffer-other-tab
|
||||||
(let ((display-buffer-overriding-action
|
:around #'switch-to-buffer-other-window
|
||||||
(if (eq action t)
|
:around #'switch-to-buffer-other-frame
|
||||||
display-buffer-overriding-action
|
(let ((display-buffer-alist nil))
|
||||||
action)))
|
(apply orig-fn args)))
|
||||||
(funcall orig-fn buffer-or-name action norecord)))
|
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
Reference in New Issue
Block a user