Fix doom-lookup-key

+ Scanning wrong variable for minor mode keymaps (minor-mode-alist ->
  minor-mode-map-alist).
+ Accommodate possibility that emulation-mode-map-alists may contain
  nested alists (#4538).

Closes #4538
This commit is contained in:
Henrik Lissner 2021-01-18 17:43:57 -05:00
parent 1c8451e509
commit 63929a240c

View file

@ -100,11 +100,13 @@ at the values with which this function was called."
(lookup-key keymap keys)
(cl-loop for keymap
in (append (cl-loop for alist in emulation-mode-map-alists
if (boundp alist)
append (mapcar #'cdr (symbol-value alist)))
append (mapcar #'cdr
(if (symbolp alist)
(if (boundp alist) (symbol-value alist))
alist)))
(list (current-local-map))
(mapcar #'cdr minor-mode-overriding-map-alist)
(mapcar #'cdr minor-mode-alist)
(mapcar #'cdr minor-mode-map-alist)
(list (current-global-map)))
if (keymapp keymap)
if (lookup-key keymap keys)