From 348ff3f65d2326ce651ccbce2454262f2f34e762 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 31 Jul 2021 00:40:12 -0400 Subject: [PATCH] fix(popup): overaggressive ignoring of popup rules Would cause errors in some legitimate cases where we want display-buffer-alist respected. --- modules/ui/popup/+hacks.el | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/modules/ui/popup/+hacks.el b/modules/ui/popup/+hacks.el index 5e6f02b02..c2e1af38f 100644 --- a/modules/ui/popup/+hacks.el +++ b/modules/ui/popup/+hacks.el @@ -50,15 +50,14 @@ to this commmand." (+popup/close nil 'force)))) (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 override `display-buffer-alist'." - :around #'pop-to-buffer - (let ((display-buffer-overriding-action - (if (eq action t) - display-buffer-overriding-action - action))) - (funcall orig-fn buffer-or-name action norecord))) + :around #'switch-to-buffer-other-tab + :around #'switch-to-buffer-other-window + :around #'switch-to-buffer-other-frame + (let ((display-buffer-alist nil)) + (apply orig-fn args))) ;;