[Top][All Lists]

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

master 55ff91e: Fix keymap-lookup implementation

From: Lars Ingebrigtsen
Subject: master 55ff91e: Fix keymap-lookup implementation
Date: Fri, 3 Dec 2021 23:26:00 -0500 (EST)

branch: master
commit 55ff91e822b3ffaf43ef2330aba33f2ba85ea12a
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Fix keymap-lookup implementation
    * lisp/keymap.el (keymap-lookup): Make this actually work for
    looking up keys.
 lisp/keymap.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/keymap.el b/lisp/keymap.el
index 07e43c3..48f087c 100644
--- a/lisp/keymap.el
+++ b/lisp/keymap.el
@@ -407,10 +407,10 @@ be a number or marker, in which case the keymap 
properties at the
 specified buffer position instead of point are used."
   (declare (compiler-macro (lambda (form) (keymap--compile-check key) form)))
   (keymap--check key)
-  (when (and keymap (not position))
+  (when (and keymap position)
     (error "Can't pass in both keymap and position"))
   (if keymap
-      (let ((value (lookup-key (key-parse key) keymap accept-default)))
+      (let ((value (lookup-key keymap (key-parse key) accept-default)))
         (when (and (not no-remap)
                    (symbolp value))
           (or (command-remapping value) value)))

reply via email to

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