emacs-diffs
[Top][All Lists]
Advanced

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

master 79825f7: Make keymap-lookup work for keymap results, too


From: Lars Ingebrigtsen
Subject: master 79825f7: Make keymap-lookup work for keymap results, too
Date: Fri, 10 Dec 2021 07:11:35 -0500 (EST)

branch: master
commit 79825f724f5d04820d154725f83186efaa2b90e8
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Make keymap-lookup work for keymap results, too
    
    * lisp/keymap.el (keymap-lookup): Make this function work for
    non-symbol lookups, too (bug#52374).
---
 lisp/keymap.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/keymap.el b/lisp/keymap.el
index 48f087c..fd91689 100644
--- a/lisp/keymap.el
+++ b/lisp/keymap.el
@@ -411,9 +411,10 @@ specified buffer position instead of point are used."
     (error "Can't pass in both keymap and position"))
   (if keymap
       (let ((value (lookup-key keymap (key-parse key) accept-default)))
-        (when (and (not no-remap)
+        (if (and (not no-remap)
                    (symbolp value))
-          (or (command-remapping value) value)))
+            (or (command-remapping value) value)
+          value))
     (key-binding (kbd key) accept-default no-remap position)))
 
 (defun keymap-local-lookup (keys &optional accept-default)



reply via email to

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