summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/python.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 9cf88ea656b..d9fc5c50091 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -3163,7 +3163,9 @@ t when called interactively."
(python-shell--encode-string (or (buffer-file-name)
"<string>")))))
(if (or (null (process-tty-name process))
- (<= (string-bytes code) comint-max-line-length))
+ (<= (string-bytes code)
+ (or (bound-and-true-p comint-max-line-length)
+ 1024))) ;; For Emacs < 28
(comint-send-string process code)
(let* ((temp-file-name (with-current-buffer (process-buffer process)
(python-shell--save-temp-file string)))