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.
This commit is contained in:
Daniel Mendler 2024-03-16 16:58:52 +01:00
parent a959f91c75
commit 0ef8e04f27
No known key found for this signature in database
GPG key ID: D88ADB2A2693CA43

View file

@ -320,7 +320,7 @@ One of `line-mode' or `char-mode'.")
;; Also, inactive entries should be disabled rather than hidden. ;; Also, inactive entries should be disabled rather than hidden.
(easy-menu-define exwm-mode-menu exwm-mode-map (easy-menu-define exwm-mode-menu exwm-mode-map
"Menu for `exwm-mode'." "Menu for `exwm-mode'."
'("EXWM" `("EXWM"
"---" "---"
"*General*" "*General*"
"---" "---"
@ -345,7 +345,7 @@ One of `line-mode' or `char-mode'.")
["Send key" exwm-input-send-next-key (eq exwm--input-mode 'line-mode)] ["Send key" exwm-input-send-next-key (eq exwm--input-mode 'line-mode)]
;; This is merely a reference. ;; This is merely a reference.
("Send simulation key" :filter ("Send simulation key" :filter
(lambda (&rest _args) ,(lambda (&rest _args)
(let (result) (let (result)
(maphash (maphash
(lambda (key value) (lambda (key value)
@ -377,14 +377,14 @@ One of `line-mode' or `char-mode'.")
["Switch workspace" exwm-workspace-switch] ["Switch workspace" exwm-workspace-switch]
;; Place this entry at bottom to avoid selecting others by accident. ;; Place this entry at bottom to avoid selecting others by accident.
("Switch to" :filter ("Switch to" :filter
(lambda (&rest _args) ,(lambda (&rest _args)
(mapcar (lambda (i) (mapcar (lambda (i)
`[,(format "Workspace %d" i) `[,(format "Workspace %d" i)
(lambda () (lambda ()
(interactive) (interactive)
(exwm-workspace-switch ,i)) (exwm-workspace-switch ,i))
(/= ,i exwm-workspace-current-index)]) (/= ,i exwm-workspace-current-index)])
(number-sequence 0 (1- (exwm-workspace--count)))))))) (number-sequence 0 (1- (length exwm-workspace--list))))))))
(define-derived-mode exwm-mode nil "EXWM" (define-derived-mode exwm-mode nil "EXWM"
"Major mode for managing X windows. "Major mode for managing X windows.