From 410d90d170e995ea13af367630dfd5b39a7f6491 Mon Sep 17 00:00:00 2001 From: Lionel Henry Date: Wed, 31 Mar 2021 10:06:28 +0200 Subject: [PATCH] Support user-defined prompts in availability check Closes #973 --- lisp/ess-inf.el | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lisp/ess-inf.el b/lisp/ess-inf.el index f27d9fa86..4dd44d684 100644 --- a/lisp/ess-inf.el +++ b/lisp/ess-inf.el @@ -366,8 +366,7 @@ defined. If no project directory has been found, use (when-let ((proc (or proc (and ess-local-process-name (get-process ess-local-process-name))))) (unless (process-get proc 'busy) - (or (ess-debug-active-p proc) ; don't send empty lines in debugger - (when-let ((last-check (process-get proc 'last-availability-check))) + (or (when-let ((last-check (process-get proc 'last-availability-check))) (time-less-p (process-get proc 'last-eval) last-check)) (progn ;; Send an empty string and waiting a bit to make sure we are not busy. @@ -393,9 +392,7 @@ Return non-nil if the process is in a ready (not busy) state." (let ((ready (string-match-p (concat "\\(" inferior-ess-primary-prompt "\\)\\'") string))) (process-put proc 'busy-end? (and ready (process-get proc 'busy))) ;; When "\n" inserted from inferior-ess-available-p, delete the prompt. - (when (and ready - (process-get proc 'availability-check) - (string-match-p (concat "^" inferior-ess-primary-prompt "\\'") string)) + (when (and ready (process-get proc 'availability-check)) (process-put proc 'suppress-next-output? t)) (process-put proc 'availability-check nil) (when ready