Replace if/when-let with if/when-let* (#105)

The former will be deprecated in Emacs 31.

* exwm-manage.el (exwm-manage--manage-window): Replace when-let with
when-let*.
* exwm-workspace.el (exwm-workspace--update-workareas): Replace if-let
with if-let*.
This commit is contained in:
Steven Allen 2024-12-23 21:32:05 +00:00 committed by GitHub
parent ac80bf13a9
commit f5fa4b885b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -410,9 +410,9 @@ This only works when procfs is mounted, which may not be the case on some BSDs."
(if (plist-get exwm--configurations 'char-mode) (if (plist-get exwm--configurations 'char-mode)
(exwm-input-release-keyboard id) (exwm-input-release-keyboard id)
(exwm-input-grab-keyboard id)) (exwm-input-grab-keyboard id))
(when-let ((simulation-keys (plist-get exwm--configurations 'simulation-keys))) (when-let* ((simulation-keys (plist-get exwm--configurations 'simulation-keys)))
(exwm-input-set-local-simulation-keys simulation-keys)) (exwm-input-set-local-simulation-keys simulation-keys))
(when-let ((prefix-keys (plist-get exwm--configurations 'prefix-keys))) (when-let* ((prefix-keys (plist-get exwm--configurations 'prefix-keys)))
(setq-local exwm-input-prefix-keys prefix-keys)) (setq-local exwm-input-prefix-keys prefix-keys))
(setq exwm-workspace--switch-history-outdated t) (setq exwm-workspace--switch-history-outdated t)
(exwm--update-desktop id) (exwm--update-desktop id)

View file

@ -342,7 +342,7 @@ Show PROMPT to the user if non-nil."
;; Get workareas prior to struts. ;; Get workareas prior to struts.
(workareas (mapcar (workareas (mapcar
(lambda (frame) (lambda (frame)
(if-let (rect (frame-parameter frame 'exwm-geometry)) (if-let* ((rect (frame-parameter frame 'exwm-geometry)))
;; Use the 'exwm-geometry' frame parameter if it ;; Use the 'exwm-geometry' frame parameter if it
;; exists. Make sure to clone it, will be modified ;; exists. Make sure to clone it, will be modified
;; below! ;; below!