mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
Keep python.el compatible with older Emacsen
* progmodes/python.el (python-shell-send-string): Don't assume comint-max-line-length is defined (bug#50503).
This commit is contained in:
parent
ef65d717d0
commit
84e35ff786
1 changed files with 3 additions and 1 deletions
|
|
@ -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)))
|
||||
|
|
|
|||
Loading…
Reference in a new issue