branch: externals/marginalia commit eecc6e257695cd35a912c91aa635dad083b8a0a8 Author: Omar Antolín <omar.anto...@gmail.com> Commit: Omar Antolín <omar.anto...@gmail.com>
Get key binding active in next window instead of in the minibuffer --- marginalia.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/marginalia.el b/marginalia.el index f158d22..f05c919 100644 --- a/marginalia.el +++ b/marginalia.el @@ -122,7 +122,9 @@ Annotations are only shown if `marginalia-mode' is enabled." (defun marginalia-annotate-command-binding (cand) "Annotate command CAND with keybinding." ;; Taken from Emacs 28, read-extended-command--annotation - (when-let* ((binding (where-is-internal (intern cand) overriding-local-map t)) + (when-let* ((binding + (with-current-buffer (window-buffer (next-window)) + (where-is-internal (intern cand) overriding-local-map t))) (desc (and (not (stringp binding)) (key-description binding)))) (propertize (format " (%s)" desc) 'face 'marginalia-key)))