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

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

[elpa] externals/embark df9a0df 2/3: Have embark-keymap-prompter-key del


From: ELPA Syncer
Subject: [elpa] externals/embark df9a0df 2/3: Have embark-keymap-prompter-key delegate to embark-keymap-prompter
Date: Tue, 9 Nov 2021 11:57:19 -0500 (EST)

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

    Have embark-keymap-prompter-key delegate to embark-keymap-prompter
    
    This is how it should have been all along! Thanks to @roshanshariff
    for suggesting this change.
---
 embark.el | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/embark.el b/embark.el
index 7ef5ddf..f8e6755 100644
--- a/embark.el
+++ b/embark.el
@@ -1168,19 +1168,13 @@ If NO-DEFAULT is t, no default value is passed to 
`completing-read'."
                       (define-key map embark-keymap-prompter-key
                         (lambda ()
                           (interactive)
-                          (let*
-                              ((desc
-                                (let ((overriding-terminal-local-map keymap))
-                                  (key-description
-                                   (read-key-sequence "Key:"))))
-                               (cmd
-                                (cl-loop
-                                 for (_s _n cmd _k desc1) in candidates
-                                 when (equal desc desc1) return cmd)))
+                          (message "Press key binding")
+                          (let ((cmd (embark-keymap-prompter keymap _update)))
                             (if (null cmd)
                                 (user-error "Unknown key")
                               (throw 'choice cmd))))))
-                    (use-local-map (make-composed-keymap map 
(current-local-map)))))
+                    (use-local-map
+                     (make-composed-keymap map (current-local-map)))))
               (completing-read
                "Command: "
                (lambda (string predicate action)



reply via email to

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