From 978e121ed0ec36615b9b0c80b1850ce62fcd9f25 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 1 Mar 2017 22:15:32 -0500 Subject: [PATCH] doom/popup-close: refactor --- core/autoload/popups.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/autoload/popups.el b/core/autoload/popups.el index 80ed933a1..56014d78d 100644 --- a/core/autoload/popups.el +++ b/core/autoload/popups.el @@ -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)