[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master bac632a: Fix a recent change wrt 'comint-max-line-length'
From: |
Eli Zaretskii |
Subject: |
master bac632a: Fix a recent change wrt 'comint-max-line-length' |
Date: |
Thu, 9 Sep 2021 13:09:30 -0400 (EDT) |
branch: master
commit bac632aaec3add5c8ecaf75ea481b93ac8c1a2cb
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
Fix a recent change wrt 'comint-max-line-length'
* 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 | 5 ++++-
lisp/progmodes/python.el | 3 ++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/lisp/comint.el b/lisp/comint.el
index c2e528a..02878cc 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -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)))
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 8f7bb7a..3fc2700 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -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)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master bac632a: Fix a recent change wrt 'comint-max-line-length',
Eli Zaretskii <=