mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
doom/popup-close: refactor
This commit is contained in:
@ -74,12 +74,12 @@ Returns t if popups were restored, nil otherwise."
|
|||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun doom/popup-close (&optional window)
|
(defun doom/popup-close (&optional window)
|
||||||
"Find and close WINDOW if it's a popup. If WINDOW is omitted, it will use
|
"Find and close WINDOW if it's a popup. If WINDOW is omitted, defaults to
|
||||||
`selected-window'. The contained buffer is buried."
|
`selected-window'. The contained buffer is buried, unless it has an :autokill
|
||||||
|
property."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((window (or window (selected-window))))
|
(when-let (window (doom-popup-p window))
|
||||||
(when (doom-popup-p window)
|
(delete-window window)))
|
||||||
(delete-window window))))
|
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun doom/popup-close-all (&optional force-p)
|
(defun doom/popup-close-all (&optional force-p)
|
||||||
|
Reference in New Issue
Block a user