Refactor doom-popup-size (cond -> pcase)
This commit is contained in:
parent
d6133adef0
commit
9c7e431de7
1 changed files with 3 additions and 5 deletions
|
@ -169,11 +169,9 @@ only close popups that have an :autoclose property in their rule (see
|
|||
;;;###autoload
|
||||
(defun doom-popup-size (&optional window)
|
||||
"Return the size of a popup WINDOW."
|
||||
(let ((side (doom-popup-side window)))
|
||||
(cond ((memq side '(left right))
|
||||
(window-width window))
|
||||
((memq side '(above below))
|
||||
(window-height window)))))
|
||||
(pcase (doom-popup-side window)
|
||||
((or 'left 'right) (window-width window))
|
||||
((or 'above 'below) (window-height window))))
|
||||
|
||||
(defun doom--popup-data (window)
|
||||
(when-let (buffer (window-buffer window))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue