branch: externals/dape
commit 77fa2207652b9900af27fe21460b1c3f28ff0ed2
Author: Daniel Pettersson <[email protected]>
Commit: Daniel Pettersson <[email protected]>
Fix interactive commands in REPL #11
`call-interactively' should be used for dape commands in repl
buffer. Also changed how dape-configs get filtered in non prog buffers
to accommodate using `dape` from REPL.
---
dape.el | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/dape.el b/dape.el
index 359cc794cc..3848271218 100644
--- a/dape.el
+++ b/dape.el
@@ -2338,7 +2338,7 @@ interactively or if SELECT-BUFFER is non nil."
return value))))
(setq dape--repl-insert-text-guard t)
(comint-output-filter dummy-process "\n> ")
- (funcall cmd)
+ (call-interactively cmd)
(setq dape--repl-insert-text-guard nil))
;; Evaluate expression
((dape--stopped-threads)
@@ -2604,7 +2604,11 @@ arrays [%S ...], if meant as an object replace (%S ...)
with (:%s ...)"
(let ((modes (plist-get config 'modes)))
(or (not modes)
(apply 'provided-mode-derived-p
- major-mode (cl-map 'list 'identity modes)))))
+ major-mode (cl-map 'list 'identity modes))
+ (and (not (derived-mode-p 'prog-mode))
+ (cl-some (lambda (mode)
+ (memql mode (plist-get dape--config 'modes)))
+ modes)))))
(defun dape--read-config ()
"Read config name and options."