]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix a recent change wrt 'comint-max-line-length'
authorEli Zaretskii <eliz@gnu.org>
Thu, 9 Sep 2021 17:08:56 +0000 (20:08 +0300)
committerEli Zaretskii <eliz@gnu.org>
Thu, 9 Sep 2021 17:08:56 +0000 (20:08 +0300)
* lisp/progmodes/python.el (python-shell-send-string): Only heed
'comint-max-line-length' for subprocesses with which we
communicate via PTYs.  (Bug#49822)

* lisp/comint.el (comint-max-line-length): Doc fix.  Add a value
for MS-Windows.

lisp/comint.el
lisp/progmodes/python.el

index c2e528a5d5311671b88569cd81fd183c813d6914..02878cc6419f06e171e4c51cec3b85170aeebac0 100644 (file)
@@ -482,8 +482,11 @@ executed once, when the buffer is created."
 (defconst comint-max-line-length
   (pcase system-type
     ('gnu/linux 4096)
+    ('windows-nt 8196)
     (_ 1024))
-  "Maximum line length, in bytes, accepted by the inferior process.")
+  "Maximum line length, in bytes, accepted by the inferior process.
+This setting is only meaningful when communicating with subprocesses
+via PTYs.")
 
 (defvar comint-mode-map
   (let ((map (make-sparse-keymap)))
index 8f7bb7a8b60c1d771df5151d8a0e043d7a90313d..3fc2700663f287d987035c3176cc5deef3730099 100644 (file)
@@ -3152,7 +3152,8 @@ t when called interactively."
                       (python-shell--encode-string string)
                       (python-shell--encode-string (or (buffer-file-name)
                                                        "<string>")))))
-    (if (<= (string-bytes code) comint-max-line-length)
+    (if (or (null (process-connection-type process))
+            (<= (string-bytes code) comint-max-line-length))
         (comint-send-string process code)
       (let* ((temp-file-name (with-current-buffer (process-buffer process)
                                (python-shell--save-temp-file string)))