emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/exwm 81e5226: * exwm-workspace.el: Use closures rather


From: Stefan Monnier
Subject: [elpa] externals/exwm 81e5226: * exwm-workspace.el: Use closures rather than `(lambda ...)
Date: Sun, 17 Mar 2019 10:47:31 -0400 (EDT)

branch: externals/exwm
commit 81e52263a74d1fcd322249f1674729597d607a76
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>

    * exwm-workspace.el: Use closures rather than `(lambda ...)
---
 exwm-workspace.el | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/exwm-workspace.el b/exwm-workspace.el
index f6b8fba..cca4ed8 100644
--- a/exwm-workspace.el
+++ b/exwm-workspace.el
@@ -176,9 +176,9 @@ NIL if FRAME is not a workspace"
                      (= (length key) 1)
                      (<= 0 (elt key 0) 127))
             (define-key map key
-              `(lambda ()
-                 (interactive)
-                 (exwm-workspace--switch-map-select-nth ,i)))))))
+              (lambda ()
+                (interactive)
+                (exwm-workspace--switch-map-select-nth i)))))))
     (define-key map "\C-a" (lambda () (interactive) (goto-history-element 1)))
     (define-key map "\C-e" (lambda ()
                              (interactive)
@@ -497,17 +497,17 @@ PREFIX-DIGITS is a list of the digits introduced so far."
       ;; Go ahead if there are enough digits to select any workspace.
       (set-transient-map
        (let ((map (make-sparse-keymap))
-             (cmd `(lambda ()
+             (cmd (let ((digits (cons d prefix-digits)))
+                    (lambda ()
                      (interactive)
-                     (exwm-workspace--switch-map-nth-prefix
-                      ',(cons d prefix-digits)))))
+                     (exwm-workspace--switch-map-nth-prefix digits)))))
          (dotimes (i 10)
            (define-key map (int-to-string i) cmd))
          ;; Accept
          (define-key map [return]
-           `(lambda ()
-              (interactive)
-              (exwm-workspace--switch-map-select-nth ,n)))
+           (lambda ()
+             (interactive)
+             (exwm-workspace--switch-map-select-nth n)))
          map)))))
 
 (defun exwm-workspace--switch-map-select-nth (n)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]