Refactor core-popups; improve popups/persp-mode integration

This commit is contained in:
Henrik Lissner 2017-02-08 17:56:27 -05:00
parent 55e4434d77
commit 5d5c3bf92e
3 changed files with 91 additions and 62 deletions

View file

@ -5,7 +5,9 @@
(defun doom-popup-p (&optional window)
"Return t if WINDOW is a popup. Uses current window if WINDOW is omitted."
(let ((window (or window (selected-window))))
(and window (buffer-local-value 'doom-popup-mode (window-buffer window)))))
(and window
(or (window-parameter window 'popup)
(buffer-local-value 'doom-popup-mode (window-buffer window))))))
;;;###autoload
(defun doom-popup-buffer (buffer &rest plist)