diff --git a/dape.el b/dape.el index a67b6509..97ff4583 100644 --- a/dape.el +++ b/dape.el @@ -5211,28 +5211,31 @@ See `dape--config-mode-p' how \"valid\" is defined." (add-hook 'after-change-functions #'dape--minibuffer-hint nil t) (dape--minibuffer-hint)) - (pcase-let* ((str - (let ((history-add-new-input nil)) - (read-from-minibuffer - "Run adapter: " - initial-contents - (let ((map (make-sparse-keymap))) - (set-keymap-parent map minibuffer-local-map) - (define-key map (kbd "C-M-i") #'completion-at-point) - (define-key map "\t" #'completion-at-point) - (define-key map (kbd "C-c C-k") - (lambda () - (interactive) - (pcase-let* ((str (buffer-substring (minibuffer-prompt-end) - (point-max))) - (`(,key) (dape--config-from-string str t))) - (delete-region (minibuffer-prompt-end) (point-max)) - (insert (format "%s" key) " ")))) - map) - nil 'dape-history initial-contents))) - (`(,key ,config) - (dape--config-from-string (substring-no-properties str) t)) - (evaled-config (dape--config-eval key config))) + (pcase-let* + ((str + (let ((history-add-new-input nil)) + (read-from-minibuffer + "Run adapter: " + initial-contents + (let ((map (make-sparse-keymap))) + (set-keymap-parent map minibuffer-local-map) + (define-key map (kbd "C-M-i") #'completion-at-point) + (define-key map "\t" #'completion-at-point) + (define-key map (kbd "C-c C-k") + (lambda () + (interactive) + (pcase-let* + ((str (buffer-substring (minibuffer-prompt-end) + (point-max))) + (`(,key) (dape--config-from-string str t))) + (delete-region (minibuffer-prompt-end) + (point-max)) + (insert (format "%s" key) " ")))) + map) + nil 'dape-history initial-contents))) + (`(,key ,config) + (dape--config-from-string (substring-no-properties str) t)) + (evaled-config (dape--config-eval key config))) (setq dape-history (cons (dape--config-to-string key evaled-config) dape-history))