Make +popup/diagnose output result
Rather than succeed silently.
This commit is contained in:
parent
2c70b75c6c
commit
0904ee406f
1 changed files with 8 additions and 7 deletions
|
@ -436,13 +436,14 @@ window and return that window."
|
||||||
(defun +popup/diagnose ()
|
(defun +popup/diagnose ()
|
||||||
"Reveal what popup rule will be used for the current buffer."
|
"Reveal what popup rule will be used for the current buffer."
|
||||||
(interactive)
|
(interactive)
|
||||||
(or (cl-loop with bname = (buffer-name)
|
(if-let (rule (cl-loop with bname = (buffer-name)
|
||||||
for (pred . action) in display-buffer-alist
|
for (pred . action) in display-buffer-alist
|
||||||
if (and (functionp pred) (funcall pred bname action))
|
if (and (functionp pred) (funcall pred bname action))
|
||||||
return (cons pred action)
|
return (cons pred action)
|
||||||
else if (and (stringp pred) (string-match-p pred bname))
|
else if (and (stringp pred) (string-match-p pred bname))
|
||||||
return (cons pred action))
|
return (cons pred action)))
|
||||||
(message "No popup rule for this buffer")))
|
(message "Rule matches: %s" rule)
|
||||||
|
(message "No popup rule for this buffer")))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue