diff options
author | Daniel Mendler <mail@daniel-mendler.de> | 2024-03-16T15·58+0100 |
---|---|---|
committer | Daniel Mendler <mail@daniel-mendler.de> | 2024-03-16T16·02+0100 |
commit | 0ef8e04f27bb975f8cf41e438b63e9f90c8090d6 (patch) | |
tree | 8018502dff59706a0b62c8c80ad5166e08372825 /exwm-core.el | |
parent | a959f91c75db69e8ae75c1c36fc78813ee2da544 (diff) |
exwm-mode-menu: Make lambdas visible to the byte compiler
* exwm-core.el (exwm-mode-menu): Use quasi quoting. Make lambdas visible to the byte compiler.
Diffstat (limited to 'exwm-core.el')
-rw-r--r-- | exwm-core.el | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/exwm-core.el b/exwm-core.el index b6b7ba1eafe7..e65c5c662f63 100644 --- a/exwm-core.el +++ b/exwm-core.el @@ -320,7 +320,7 @@ One of `line-mode' or `char-mode'.") ;; Also, inactive entries should be disabled rather than hidden. (easy-menu-define exwm-mode-menu exwm-mode-map "Menu for `exwm-mode'." - '("EXWM" + `("EXWM" "---" "*General*" "---" @@ -345,22 +345,22 @@ One of `line-mode' or `char-mode'.") ["Send key" exwm-input-send-next-key (eq exwm--input-mode 'line-mode)] ;; This is merely a reference. ("Send simulation key" :filter - (lambda (&rest _args) - (let (result) - (maphash - (lambda (key value) - (when (sequencep key) - (setq result (append result - `([ - ,(format "Send '%s'" - (key-description value)) - (lambda () - (interactive) - (dolist (i ',value) - (exwm-input--fake-key i))) - :keys ,(key-description key)]))))) - exwm-input--simulation-keys) - result))) + ,(lambda (&rest _args) + (let (result) + (maphash + (lambda (key value) + (when (sequencep key) + (setq result (append result + `([ + ,(format "Send '%s'" + (key-description value)) + (lambda () + (interactive) + (dolist (i ',value) + (exwm-input--fake-key i))) + :keys ,(key-description key)]))))) + exwm-input--simulation-keys) + result))) ["Define global binding" exwm-input-set-key] @@ -377,14 +377,14 @@ One of `line-mode' or `char-mode'.") ["Switch workspace" exwm-workspace-switch] ;; Place this entry at bottom to avoid selecting others by accident. ("Switch to" :filter - (lambda (&rest _args) - (mapcar (lambda (i) - `[,(format "Workspace %d" i) - (lambda () - (interactive) - (exwm-workspace-switch ,i)) - (/= ,i exwm-workspace-current-index)]) - (number-sequence 0 (1- (exwm-workspace--count)))))))) + ,(lambda (&rest _args) + (mapcar (lambda (i) + `[,(format "Workspace %d" i) + (lambda () + (interactive) + (exwm-workspace-switch ,i)) + (/= ,i exwm-workspace-current-index)]) + (number-sequence 0 (1- (length exwm-workspace--list)))))))) (define-derived-mode exwm-mode nil "EXWM" "Major mode for managing X windows. |