window-preserve-size is available since Emacs 25

* exwm-workspace.el (exwm-workspace--on-minibuffer-setup): Remove fboundp check.
This commit is contained in:
Daniel Mendler 2024-03-15 19:06:37 +01:00
parent 182102767e
commit 1ebd135f45
No known key found for this signature in database
GPG key ID: D88ADB2A2693CA43

View file

@ -1257,12 +1257,10 @@ ALIST is an action alist, as accepted by function `display-buffer'."
;; fail to retrieve the correct window. It's likely there are ;; fail to retrieve the correct window. It's likely there are
;; other related issues. ;; other related issues.
;; This is not required by Emacs 24. ;; This is not required by Emacs 24.
(when (fboundp 'window-preserve-size) (let ((window (get-buffer-window "*Completions*" exwm-workspace--current)))
(let ((window (get-buffer-window "*Completions*" (when window
exwm-workspace--current))) (fit-window-to-buffer window)
(when window (window-preserve-size window))))
(fit-window-to-buffer window)
(window-preserve-size window)))))
(defun exwm-workspace--on-minibuffer-exit () (defun exwm-workspace--on-minibuffer-exit ()
"Run in `minibuffer-exit-hook' to hide the minibuffer container." "Run in `minibuffer-exit-hook' to hide the minibuffer container."