emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 84e35ff: Keep python.el compatible with older Emacsen


From: Lars Ingebrigtsen
Subject: master 84e35ff: Keep python.el compatible with older Emacsen
Date: Sat, 11 Sep 2021 09:39:37 -0400 (EDT)

branch: master
commit 84e35ff78667a730d6f23d995ff649ded32cd420
Author: Augusto Stoffel <arstoffel@gmail.com>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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).
---
 lisp/progmodes/python.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 9cf88ea..d9fc5c5 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)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]