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

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

[elpa] externals/embark 63f0d4dc09: Fix #515


From: ELPA Syncer
Subject: [elpa] externals/embark 63f0d4dc09: Fix #515
Date: Tue, 7 Jun 2022 20:57:32 -0400 (EDT)

branch: externals/embark
commit 63f0d4dc09afb058450dc10dd3916027a93ee487
Author: Omar Antolín <omar.antolin@gmail.com>
Commit: Omar Antolín <omar.antolin@gmail.com>

    Fix #515
    
    In terminal Emacs, the default binding for scroll-other-window, namely
    C-M-v, is read as ESC C-v, i.e., [27 22]. When you lookup this in a
    keymap where it is not defined using lookup-key, you do not get nil,
    but rather the number 1, indicating that [27] is an invalid prefix. So
    I really should have been checking for a non-nil, *non-number* return
    value to indicate the key is directly bound.
---
 embark.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/embark.el b/embark.el
index 07c0249be6..5daae8d544 100644
--- a/embark.el
+++ b/embark.el
@@ -1071,7 +1071,8 @@ UPDATE is the indicator update function."
         update))
       ((or 'minibuffer-keyboard-quit 'abort-recursive-edit 'abort-minibuffers)
        nil)
-      ((guard (lookup-key keymap keys))  ; if directly bound, then obey
+      ((guard (let ((def (lookup-key keymap keys))) ; if directly bound, then 
obey
+                (and def (not (numberp def))))) ; number means "invalid prefix"
        cmd)
       ('self-insert-command
        (minibuffer-message "Not an action")



reply via email to

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