diff options
| author | Fabián Ezequiel Gallina | 2012-05-17 00:03:09 -0300 |
|---|---|---|
| committer | Fabián Ezequiel Gallina | 2012-05-17 00:03:09 -0300 |
| commit | 30e429dd37d8a97afcf0129f8fe498438a611d65 (patch) | |
| tree | 41b9992b45c2c6eedecd1e6ffdfac406f7ae104d | |
| parent | e2d8d4790fa69c61976341e89e61eec558a4bcc7 (diff) | |
| download | emacs-30e429dd37d8a97afcf0129f8fe498438a611d65.tar.gz emacs-30e429dd37d8a97afcf0129f8fe498438a611d65.zip | |
New variable python-shell-send-setup-max-wait
Controls the timeout for output just before sending the setup code.
| -rw-r--r-- | lisp/progmodes/python.el | 10 |
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. | ||
| 989 | If output is received before the especified time then control is | ||
| 990 | returned 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) |