Add +popup/diagnose for debugging popup rules
This commit is contained in:
parent
b41e38dcf4
commit
5c14fb42e0
1 changed files with 12 additions and 0 deletions
|
@ -390,6 +390,18 @@ the message buffer in a popup window."
|
||||||
(+popup/close window 'force)
|
(+popup/close window 'force)
|
||||||
(display-buffer-pop-up-window buffer nil)))
|
(display-buffer-pop-up-window buffer nil)))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun +popup/diagnose ()
|
||||||
|
"Reveal what popup rule will be used for the current buffer."
|
||||||
|
(interactive)
|
||||||
|
(or (cl-loop with bname = (buffer-name)
|
||||||
|
for (pred . action) in display-buffer-alist
|
||||||
|
if (and (functionp pred) (funcall pred bname action))
|
||||||
|
return (cons pred action)
|
||||||
|
else if (and (stringp pred) (string-match-p pred bname))
|
||||||
|
return (cons pred action))
|
||||||
|
(message "No popup rule for this buffer")))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; Advice
|
;; Advice
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue