Commit 30e429dd authored by Fabián Ezequiel Gallina's avatar Fabián Ezequiel Gallina Committed by Fabián Ezequiel Gallina
Browse files

New variable python-shell-send-setup-max-wait

Controls the timeout for output just before sending the setup code.
parent e2d8d479
...@@ -984,6 +984,14 @@ It should not contain a caret (^) at the beginning." ...@@ -984,6 +984,14 @@ It should not contain a caret (^) at the beginning."
:group 'python :group 'python
:safe 'stringp) :safe 'stringp)
(defcustom python-shell-send-setup-max-wait 5
"Seconds to wait for process output before code setup.
If output is received before the especified time then control is
returned in that moment and not after waiting."
:type 'number
:group 'python
:safe 'numberp)
(defcustom python-shell-setup-codes '(python-shell-completion-setup-code (defcustom python-shell-setup-codes '(python-shell-completion-setup-code
python-ffap-setup-code python-ffap-setup-code
python-eldoc-setup-code) python-eldoc-setup-code)
...@@ -1260,7 +1268,7 @@ This function takes the list of setup code to send from the ...@@ -1260,7 +1268,7 @@ This function takes the list of setup code to send from the
`python-shell-setup-codes' list." `python-shell-setup-codes' list."
(let ((msg "Sent %s") (let ((msg "Sent %s")
(process (get-buffer-process (current-buffer)))) (process (get-buffer-process (current-buffer))))
(accept-process-output process 1) (accept-process-output process python-shell-send-setup-max-wait)
(dolist (code python-shell-setup-codes) (dolist (code python-shell-setup-codes)
(when code (when code
(when (consp code) (when (consp code)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment