Skip to content

Commit

Permalink
; Make more lambdas visible to the byte compiler
Browse files Browse the repository at this point in the history
* exwm-core.el (exwm-mode-menu), exwm-floating.el (exwm-floating-border-width):
  Make lambdas visible to the byte compiler.
  • Loading branch information
minad committed Mar 16, 2024
1 parent 0ef8e04 commit bf92108
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
18 changes: 9 additions & 9 deletions exwm-core.el
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ Here are some predefined candidates:
(declare-function exwm-manage--kill-buffer-query-function "exwm-manage.el")
(declare-function exwm-workspace-move-window "exwm-workspace.el"
(frame-or-index &optional id))
(declare-function exwm-workspace-switch "exwm-workspace.el"
(frame-or-index &optional force))

(define-minor-mode exwm-debug
"Debug-logging enabled if non-nil."
Expand Down Expand Up @@ -351,13 +353,11 @@ One of `line-mode' or `char-mode'.")
(lambda (key value)
(when (sequencep key)
(setq result (append result
`([
,(format "Send '%s'"
`([,(format "Send '%s'"
(key-description value))
(lambda ()
(interactive)
(dolist (i ',value)
(exwm-input--fake-key i)))
,(lambda ()
(interactive)
(mapc #'exwm-input--fake-key value))
:keys ,(key-description key)])))))
exwm-input--simulation-keys)
result)))
Expand All @@ -380,9 +380,9 @@ One of `line-mode' or `char-mode'.")
,(lambda (&rest _args)
(mapcar (lambda (i)
`[,(format "Workspace %d" i)
(lambda ()
(interactive)
(exwm-workspace-switch ,i))
,(lambda ()
(interactive)
(exwm-workspace-switch i))
(/= ,i exwm-workspace-current-index)])
(number-sequence 0 (1- (length exwm-workspace--list))))))))

Expand Down
10 changes: 5 additions & 5 deletions exwm-floating.el
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ This hook runs in the context of the corresponding buffer."

(defcustom exwm-floating-border-width 1
"Border width of floating windows."
:type '(integer
:validate (lambda (widget)
(when (< (widget-value widget) 0)
(widget-put widget :error "Border width is at least 0")
widget)))
:type `(integer
:validate ,(lambda (widget)
(when (< (widget-value widget) 0)
(widget-put widget :error "Border width is at least 0")
widget)))
:initialize #'custom-initialize-default
:set (lambda (symbol value)
(let ((delta (- value exwm-floating-border-width))
Expand Down

0 comments on commit bf92108

Please sign in to comment.