aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 0a09ec55ef7..94035546c6e 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -984,6 +984,14 @@ It should not contain a caret (^) at the beginning."
984 :group 'python 984 :group 'python
985 :safe 'stringp) 985 :safe 'stringp)
986 986
987(defcustom python-shell-send-setup-max-wait 5
988 "Seconds to wait for process output before code setup.
989If output is received before the especified time then control is
990returned in that moment and not after waiting."
991 :type 'number
992 :group 'python
993 :safe 'numberp)
994
987(defcustom python-shell-setup-codes '(python-shell-completion-setup-code 995(defcustom python-shell-setup-codes '(python-shell-completion-setup-code
988 python-ffap-setup-code 996 python-ffap-setup-code
989 python-eldoc-setup-code) 997 python-eldoc-setup-code)
@@ -1260,7 +1268,7 @@ This function takes the list of setup code to send from the
1260`python-shell-setup-codes' list." 1268`python-shell-setup-codes' list."
1261 (let ((msg "Sent %s") 1269 (let ((msg "Sent %s")
1262 (process (get-buffer-process (current-buffer)))) 1270 (process (get-buffer-process (current-buffer))))
1263 (accept-process-output process 1) 1271 (accept-process-output process python-shell-send-setup-max-wait)
1264 (dolist (code python-shell-setup-codes) 1272 (dolist (code python-shell-setup-codes)
1265 (when code 1273 (when code
1266 (when (consp code) 1274 (when (consp code)