diff --git a/modules/tools/eval/autoload/repl.el b/modules/tools/eval/autoload/repl.el index f169e747f..9cb0e8227 100644 --- a/modules/tools/eval/autoload/repl.el +++ b/modules/tools/eval/autoload/repl.el @@ -132,9 +132,11 @@ immediately after." (insert line) (if inhibit-auto-execute-p (insert "\n") - ;; `comint-send-input' isn't enough because some REPLs may not use - ;; comint, so just emulate the keypress. - (execute-kbd-macro (kbd "RET"))) + ;; Can't use `comint-send-input' b/c there's no guarantee the + ;; current REPL uses comint. Even if it did, no telling if they + ;; have their own `comint-send-input' wrapper, so to be safe, I + ;; simply emulate the keypress. + (call-interactively (doom-lookup-key (kbd "RET")))) (sit-for 0.001) (redisplay 'force))) (when (and (eq origin-window (selected-window))