From 0904ee406f1d4bc5c40e33f6706e1c2fd88bdbe2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 3 May 2020 16:25:17 -0400 Subject: [PATCH] Make +popup/diagnose output result Rather than succeed silently. --- modules/ui/popup/autoload/popup.el | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/modules/ui/popup/autoload/popup.el b/modules/ui/popup/autoload/popup.el index 34279daea..aeb35884e 100644 --- a/modules/ui/popup/autoload/popup.el +++ b/modules/ui/popup/autoload/popup.el @@ -436,13 +436,14 @@ window and return that window." (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"))) + (if-let (rule (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 "Rule matches: %s" rule) + (message "No popup rule for this buffer"))) ;;