diff options
| author | Simon Marshall | 1995-02-25 16:16:57 +0000 |
|---|---|---|
| committer | Simon Marshall | 1995-02-25 16:16:57 +0000 |
| commit | 4841acc4374b5d44e70355e84db66b2827f39a43 (patch) | |
| tree | a180938a374148be2ac88cc62dafa8e19103befa | |
| parent | 8079b5901c7cd5885b085bce67b5a151d7c146bf (diff) | |
| download | emacs-4841acc4374b5d44e70355e84db66b2827f39a43.tar.gz emacs-4841acc4374b5d44e70355e84db66b2827f39a43.zip | |
Moved buffer truncation functionality to comint.el.
| -rw-r--r-- | lisp/shell.el | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/lisp/shell.el b/lisp/shell.el index 64b52c4f1ef..ba87a0f8ba4 100644 --- a/lisp/shell.el +++ b/lisp/shell.el | |||
| @@ -156,10 +156,6 @@ This mirrors the optional behavior of tcsh. | |||
| 156 | 156 | ||
| 157 | Detecting executability of files may slow command completion considerably.") | 157 | Detecting executability of files may slow command completion considerably.") |
| 158 | 158 | ||
| 159 | (defvar shell-buffer-maximum-size 1024 | ||
| 160 | "*The maximum size in lines for shell buffers. | ||
| 161 | Shell buffers are truncated from the top to be no greater than this number.") | ||
| 162 | |||
| 163 | (defvar shell-popd-regexp "popd" | 159 | (defvar shell-popd-regexp "popd" |
| 164 | "*Regexp to match subshell commands equivalent to popd.") | 160 | "*Regexp to match subshell commands equivalent to popd.") |
| 165 | 161 | ||
| @@ -265,7 +261,7 @@ If you want to make multiple shell buffers, rename the `*shell*' buffer | |||
| 265 | using \\[rename-buffer] or \\[rename-uniquely] and start a new shell. | 261 | using \\[rename-buffer] or \\[rename-uniquely] and start a new shell. |
| 266 | 262 | ||
| 267 | If you want to make shell buffers limited in length, add the function | 263 | If you want to make shell buffers limited in length, add the function |
| 268 | `shell-truncate-buffer' to `comint-output-filter-functions'. | 264 | `comint-truncate-buffer' to `comint-output-filter-functions'. |
| 269 | 265 | ||
| 270 | If you accidentally suspend your process, use \\[comint-continue-subjob] | 266 | If you accidentally suspend your process, use \\[comint-continue-subjob] |
| 271 | to continue it. | 267 | to continue it. |
| @@ -631,14 +627,6 @@ command again." | |||
| 631 | (setq ds (cdr ds)))) | 627 | (setq ds (cdr ds)))) |
| 632 | (message msg))) | 628 | (message msg))) |
| 633 | 629 | ||
| 634 | (defun shell-truncate-buffer (string) | ||
| 635 | "Truncate the buffer to `shell-buffer-maximum-size'." | ||
| 636 | (save-excursion | ||
| 637 | (goto-char (point-max)) | ||
| 638 | (forward-line (- shell-buffer-maximum-size)) | ||
| 639 | (beginning-of-line) | ||
| 640 | (delete-region (point-min) (point)))) | ||
| 641 | |||
| 642 | (defun shell-forward-command (&optional arg) | 630 | (defun shell-forward-command (&optional arg) |
| 643 | "Move forward across ARG shell command(s). Does not cross lines. | 631 | "Move forward across ARG shell command(s). Does not cross lines. |
| 644 | See `shell-command-regexp'." | 632 | See `shell-command-regexp'." |