doom/popup-close: refactor
This commit is contained in:
parent
2e66b2e13d
commit
978e121ed0
1 changed files with 5 additions and 5 deletions
|
@ -74,12 +74,12 @@ Returns t if popups were restored, nil otherwise."
|
|||
|
||||
;;;###autoload
|
||||
(defun doom/popup-close (&optional window)
|
||||
"Find and close WINDOW if it's a popup. If WINDOW is omitted, it will use
|
||||
`selected-window'. The contained buffer is buried."
|
||||
"Find and close WINDOW if it's a popup. If WINDOW is omitted, defaults to
|
||||
`selected-window'. The contained buffer is buried, unless it has an :autokill
|
||||
property."
|
||||
(interactive)
|
||||
(let ((window (or window (selected-window))))
|
||||
(when (doom-popup-p window)
|
||||
(delete-window window))))
|
||||
(when-let (window (doom-popup-p window))
|
||||
(delete-window window)))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom/popup-close-all (&optional force-p)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue