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

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

[elpa] externals/kubed 8463c1bb8a 34/70: Ensure SPC is self-inserting wh


From: ELPA Syncer
Subject: [elpa] externals/kubed 8463c1bb8a 34/70: Ensure SPC is self-inserting when reading kubectl command line
Date: Tue, 6 Aug 2024 06:58:29 -0400 (EDT)

branch: externals/kubed
commit 8463c1bb8a31deb619dfdc323b28dae9c183adc3
Author: Eshel Yaron <me@eshelyaron.com>
Commit: Eshel Yaron <me@eshelyaron.com>

    Ensure SPC is self-inserting when reading kubectl command line
    
    * cobra.el (cobra-read-command-line): Ensure SPC key is
    self-inserting in the minibuffer.
---
 cobra.el | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/cobra.el b/cobra.el
index 8efb3e2410..1fdbabe6e1 100644
--- a/cobra.el
+++ b/cobra.el
@@ -129,8 +129,15 @@ Perform completion action A on string S with predicate P."
 Optional argument HIST is the name of the history list variable to use,
 if it is nil or omitted, it defaults to `shell-command-history'."
   (let ((exec (car (split-string-and-unquote initial))))
-    (completing-read prompt (apply-partially #'cobra-completion-table exec)
-                     nil nil initial (or hist 'shell-command-history))))
+    (minibuffer-with-setup-hook
+        (:append (lambda ()
+                   (let ((map (make-sparse-keymap)))
+                     ;; Ensure SPC is self-inserting.
+                     (keymap-unset map "SPC")
+                     (use-local-map
+                      (make-composed-keymap map (current-local-map))))))
+      (completing-read prompt (apply-partially #'cobra-completion-table exec)
+                       nil nil initial (or hist 'shell-command-history)))))
 
 (provide 'cobra)
 ;;; cobra.el ends here



reply via email to

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