emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/embark 8c57c361d6 4/4: Mention prefix in prompt for emb


From: ELPA Syncer
Subject: [elpa] externals/embark 8c57c361d6 4/4: Mention prefix in prompt for embark-prefix-help-command
Date: Sat, 4 Nov 2023 21:57:52 -0400 (EDT)

branch: externals/embark
commit 8c57c361d686d352f22bd570fee4976f6ab42bcc
Author: Omar Antolín <omar.antolin@gmail.com>
Commit: Omar Antolín <omar.antolin@gmail.com>

    Mention prefix in prompt for embark-prefix-help-command
    
    This fixes #655.
---
 embark.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/embark.el b/embark.el
index d6c46a0221..7c078ddaad 100644
--- a/embark.el
+++ b/embark.el
@@ -1878,7 +1878,12 @@ type @ and the key binding (without the prefix)."
   (when-let ((keys (this-command-keys-vector))
              (prefix (seq-take keys (1- (length keys))))
              (keymap (key-binding prefix 'accept-default)))
-    (embark-bindings-in-keymap keymap)))
+    (minibuffer-with-setup-hook
+        (lambda ()
+          (let ((pt (- (minibuffer-prompt-end) 2)))
+            (overlay-put (make-overlay pt pt) 'before-string
+                         (format " under %s" (key-description prefix)))))
+      (embark-bindings-in-keymap keymap))))
 
 (defun embark--prompt (indicators keymap targets)
   "Call the prompter with KEYMAP and INDICATORS.



reply via email to

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