summaryrefslogtreecommitdiff
path: root/lisp/keymap.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2021-12-10 13:11:26 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2021-12-10 13:11:26 +0100
commit79825f724f5d04820d154725f83186efaa2b90e8 (patch)
tree91150b45bfc7d290282986d08fa89a882acc94ef /lisp/keymap.el
parente98ca32176871011451b04c0b952aef07d658f72 (diff)
downloademacs-79825f724f5d04820d154725f83186efaa2b90e8.tar.gz
Make keymap-lookup work for keymap results, too
* lisp/keymap.el (keymap-lookup): Make this function work for non-symbol lookups, too (bug#52374).
Diffstat (limited to 'lisp/keymap.el')
-rw-r--r--lisp/keymap.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/keymap.el b/lisp/keymap.el
index 48f087c5287..fd91689f887 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)