From 8b7e2c495af65d28ae1320f52f7a08a6a0920ee1 Mon Sep 17 00:00:00 2001 From: Fabián Ezequiel Gallina Date: Wed, 29 Apr 2015 21:09:58 -0300 Subject: python.el: Fix warnings on looking-back calls missing LIMIT * lisp/progmodes/python.el (python-shell-accept-process-output): Pass LIMIT arg to looking-back. --- lisp/progmodes/python.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp/progmodes/python.el') diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index eb17d075921..2e7410ac833 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -2268,7 +2268,7 @@ banner and the initial prompt are received separately." (while t (when (not (accept-process-output process timeout)) (throw 'found nil)) - (when (looking-back regexp) + (when (looking-back regexp (point-min)) (throw 'found t)))))) (defun python-shell-comint-end-of-output-p (output) -- cgit v1.2.1 From e35bf5727153bdc8be7178504a8b920b9560b7b0 Mon Sep 17 00:00:00 2001 From: Fabián Ezequiel Gallina Date: Mon, 11 May 2015 00:03:08 -0300 Subject: python.el: better limit for looking-back calls * lisp/progmodes/python.el (python-shell-accept-process-output): Use last comint prompt start as limit for looking-back. --- lisp/progmodes/python.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lisp/progmodes/python.el') diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 2e7410ac833..4b0a028faa3 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -2268,7 +2268,8 @@ banner and the initial prompt are received separately." (while t (when (not (accept-process-output process timeout)) (throw 'found nil)) - (when (looking-back regexp (point-min)) + (when (looking-back + regexp (car (python-util-comint-last-prompt))) (throw 'found t)))))) (defun python-shell-comint-end-of-output-p (output) -- cgit v1.2.1