[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/marginalia e863b6c 007/241: Show key bindings from mini
From: |
Stefan Monnier |
Subject: |
[elpa] externals/marginalia e863b6c 007/241: Show key bindings from minibuffer-selected-window |
Date: |
Fri, 28 May 2021 20:48:46 -0400 (EDT) |
branch: externals/marginalia
commit e863b6cc855a1c5af3ac2594cb002d7e69b81a50
Author: Omar Antolín <omar.antolin@gmail.com>
Commit: Omar Antolín <omar.antolin@gmail.com>
Show key bindings from minibuffer-selected-window
After a discussion on Github we decided it was better to show the key
bindings active in:
(window-buffer (minibuffer-selected-window))
rather than:
(window-buffer (next-window))
These should agree most of the time, but if the annotation function
somehow gets called from outside the minibuffer the first expression
should reduce to the current: (minibuffer-selected-window) returns nil
and then window-buffer gives you the buffer of (selected-window).
---
marginalia.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/marginalia.el b/marginalia.el
index f05c919..3ee86c4 100644
--- a/marginalia.el
+++ b/marginalia.el
@@ -123,7 +123,7 @@ Annotations are only shown if `marginalia-mode' is enabled."
"Annotate command CAND with keybinding."
;; Taken from Emacs 28, read-extended-command--annotation
(when-let* ((binding
- (with-current-buffer (window-buffer (next-window))
+ (with-current-buffer (window-buffer
(minibuffer-selected-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)))
- [elpa] branch externals/marginalia created (now 529aee6), Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia 84f0fde 002/241: add marginalia-command-annotate, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia eecc6e2 006/241: Get key binding active in next window instead of in the minibuffer, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia 863e07b 004/241: experimental: remove selectrum-specifics (may not work out!), Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia e863b6c 007/241: Show key bindings from minibuffer-selected-window,
Stefan Monnier <=
- [elpa] externals/marginalia 4780a6a 009/241: marginalia works with icomplete-vertical now!, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia 237a620 001/241: initial prototype, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia c47576c 010/241: add configuration example, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia a6dfb38 003/241: add todos, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia bdbbee2 005/241: add very basic readme, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia 6077206 008/241: Ignore byte-compiled files, autoloads and *-pkg.el files, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia 0c090f3 011/241: improve readme, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia 80fa320 016/241: Introduce list of classifiers, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia ca21d30 029/241: fix typo in the readme, Stefan Monnier, 2021/05/28
- [elpa] externals/marginalia 655f03b 035/241: introduce marginalia-annotators-(light|heavy), remove marginalia-set-command-annotator, Stefan Monnier, 2021/05/28