branch: externals/dape
commit 6b4cebae5f2b25b347c7590849299b00186f5391
Author: Daniel Pettersson <[email protected]>
Commit: Daniel Pettersson <[email protected]>
Use own keymap for dape--config-read
In emacs 30. something the read--expression-map parses expression on
enter key which does not play nice with the config string.
Fixes #17
---
dape.el | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/dape.el b/dape.el
index 58937acfdb..64224c86aa 100644
--- a/dape.el
+++ b/dape.el
@@ -2757,9 +2757,13 @@ See `dape--config-mode-p' how \"valid\" is defined."
#'dape--config-completion-at-point nil t))
(pcase-let* ((str (read-from-minibuffer "Run adapter: "
initial-contents
- read--expression-map nil
- 'dape-history
- initial-contents))
+ (let ((map (make-sparse-keymap)))
+ (set-keymap-parent map
minibuffer-local-map)
+ (define-key map "C-M-i"
#'completion-at-point)
+ (define-key map "TAB"
#'completion-at-point)
+ (define-key map "\t"
#'completion-at-point)
+ map)
+ nil 'dape-history
initial-contents))
(`(,key ,config) (dape--config-from-string
(substring-no-properties str)))
(evaled-config (dape--config-eval key config)))