branch: externals/dape
commit 4647de58c371d71686fa983b1fd95342d864b261
Author: Daniel Pettersson <[email protected]>
Commit: Daniel Pettersson <[email protected]>
Improve repl warn for non commandp dape-commands
---
dape.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/dape.el b/dape.el
index 484dfb8b62..19cff3a4ac 100644
--- a/dape.el
+++ b/dape.el
@@ -4610,7 +4610,8 @@ Called by `comint-input-sender' in `dape-repl-mode'."
(dape--repl-input-sender dummy-process last)))
;; Run command from `dape-named-commands'
((pcase-let* ((`(,cmd . ,args)
- (string-split input split-string-default-separators))
+ (string-split (substring-no-properties input)
+ split-string-default-separators))
(fn (or (alist-get cmd dape-repl-commands nil nil 'equal)
(and dape-repl-use-shorthand
(cdr (assoc cmd
(dape--repl-shorthand-alist)))))))
@@ -4625,7 +4626,9 @@ Called by `comint-input-sender' in `dape-repl-mode'."
t)
(fn
(dape--repl-insert-prompt)
- (apply fn args)
+ (condition-case-unless-debug err
+ (apply fn args)
+ (error (dape--warn "%s" (car err))))
t))))
;; Evaluate expression
(t