diff options
| author | Richard M. Stallman | 1994-09-24 04:58:15 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-09-24 04:58:15 +0000 |
| commit | 7df7d5b3fe8971ea549d9938fa0a2bdab9d9bdc6 (patch) | |
| tree | 6bd3003b920857f935bd00bddfe2f06eb163d5bc | |
| parent | 7084ad04466550687b29137293d9319e78cd18be (diff) | |
| download | emacs-7df7d5b3fe8971ea549d9938fa0a2bdab9d9bdc6.tar.gz emacs-7df7d5b3fe8971ea549d9938fa0a2bdab9d9bdc6.zip | |
(comint-input-chunk-size): Variable deleted.
(comint-send-string): Make it an alias for process-send-string.
(comint-send-region): Make it an alias for process-send-region.
| -rw-r--r-- | lisp/comint.el | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/lisp/comint.el b/lisp/comint.el index 45325e7e4db..44b885593e2 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -1416,31 +1416,8 @@ This function could be in the list `comint-output-filter-functions'." | |||
| 1416 | 1416 | ||
| 1417 | ;;; Low-level process communication | 1417 | ;;; Low-level process communication |
| 1418 | 1418 | ||
| 1419 | (defvar comint-input-chunk-size 512 | 1419 | (defalias 'comint-send-string 'process-send-string) |
| 1420 | "*Long inputs are sent to comint processes in chunks of this size. | 1420 | (defalias 'comint-send-region 'process-send-region) |
| 1421 | If your process is choking on big inputs, try lowering the value.") | ||
| 1422 | |||
| 1423 | (defun comint-send-string (proc str) | ||
| 1424 | "Send PROCESS the contents of STRING as input. | ||
| 1425 | This is equivalent to `process-send-string', except that long input strings | ||
| 1426 | are broken up into chunks of size `comint-input-chunk-size'. Processes | ||
| 1427 | are given a chance to output between chunks. This can help prevent processes | ||
| 1428 | from hanging when you send them long inputs on some OS's." | ||
| 1429 | (let* ((len (length str)) | ||
| 1430 | (i (min len comint-input-chunk-size))) | ||
| 1431 | (process-send-string proc (substring str 0 i)) | ||
| 1432 | (while (< i len) | ||
| 1433 | (let ((next-i (+ i comint-input-chunk-size))) | ||
| 1434 | (accept-process-output) | ||
| 1435 | (sit-for 0) | ||
| 1436 | (process-send-string proc (substring str i (min len next-i))) | ||
| 1437 | (setq i next-i))))) | ||
| 1438 | |||
| 1439 | (defun comint-send-region (proc start end) | ||
| 1440 | "Sends to PROC the region delimited by START and END. | ||
| 1441 | This is a replacement for `process-send-region' that tries to keep | ||
| 1442 | your process from hanging on long inputs. See `comint-send-string'." | ||
| 1443 | (comint-send-string proc (buffer-substring start end))) | ||
| 1444 | 1421 | ||
| 1445 | ;;; Random input hackage | 1422 | ;;; Random input hackage |
| 1446 | 1423 | ||