about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSteven Allen <steven@stebalien.com>2017-02-19T22·53-0800
committerSteven Allen <steven@stebalien.com>2017-02-22T18·05-0800
commit46e1d7a754bdf66cf89e6d3fad3d1c4bf003db3a (patch)
treeb8adfa2d39bef5dff6291503b24a0dcac79fe649
parent0ae1e7327ea900ad1b35ce145db63cb0837251de (diff)
Use let instead of setq when setting exwm-input--line-mode-passthrough
That way, exwm won't clobber user modifications to this variable.
-rw-r--r--exwm-input.el19
1 files changed, 9 insertions, 10 deletions
diff --git a/exwm-input.el b/exwm-input.el
index d410bec7912e..22e21d69a408 100644
--- a/exwm-input.el
+++ b/exwm-input.el
@@ -629,16 +629,15 @@ This value should always be overwritten.")
   (let (key keys)
     (dotimes (i times)
       ;; Skip events not from keyboard
-      (setq exwm-input--line-mode-passthrough t)
-      (catch 'break
-        (while t
-          (setq key (read-key (format "Send key: %s (%d/%d)"
-                                      (key-description keys)
-                                      (1+ i) times)))
-          (when (and (listp key) (eq (car key) t))
-            (setq key (cdr key)))
-          (unless (listp key) (throw 'break nil))))
-      (setq exwm-input--line-mode-passthrough nil)
+      (let ((exwm-input--line-mode-passthrough t))
+        (catch 'break
+          (while t
+            (setq key (read-key (format "Send key: %s (%d/%d)"
+                                        (key-description keys)
+                                        (1+ i) times)))
+            (when (and (listp key) (eq (car key) t))
+              (setq key (cdr key)))
+            (unless (listp key) (throw 'break nil)))))
       (setq keys (vconcat keys (vector key)))
       (exwm-input--fake-key key))))