[Top][All Lists]

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

[elpa] externals/exwm 3c8b395: Fix `exwm-input-set-simulation-key'

From: Chris Feng
Subject: [elpa] externals/exwm 3c8b395: Fix `exwm-input-set-simulation-key'
Date: Sun, 13 Oct 2019 05:22:20 -0400 (EDT)

branch: externals/exwm
commit 3c8b39505825eff7e2b61e09833374d904926724
Author: Chris Feng <address@hidden>
Commit: Chris Feng <address@hidden>

    Fix `exwm-input-set-simulation-key'
    * exwm-input.el (exwm-input--read-keys): Return nil on empty input so
    that `exwm-input-set-simulation-key' can ignore it.
    (exwm-input-set-simulation-key): Improve prompt.
 exwm-input.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/exwm-input.el b/exwm-input.el
index e648219..34fe222 100644
--- a/exwm-input.el
+++ b/exwm-input.el
@@ -976,7 +976,8 @@ Notes:
                                   (key-description (vector stop-key))
                                   (key-description keys)))
             keys (vconcat keys (vector key))))
-    (substring keys 0 -1)))
+    (when (> (length keys) 1)
+      (substring keys 0 -1))))
 (defun exwm-input-set-simulation-key (original-key simulated-key)
@@ -987,10 +988,11 @@ ends unless it's specifically saved in the Customize 
interface for
    (let (original simulated)
-     (setq original (exwm-input--read-keys "Original keys" ?\C-g))
+     (setq original (exwm-input--read-keys "Translate from" ?\C-g))
      (when original
        (setq simulated (exwm-input--read-keys
-                        (format "Simulate %s as" (key-description original))
+                        (format "Translate from %s to"
+                                (key-description original))
      (list original simulated)))
   (exwm--log "original: %s, simulated: %s" original-key simulated-key)

reply via email to

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