diff options
author | Richard M. Stallman <rms@gnu.org> | 2004-11-04 10:05:52 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2004-11-04 10:05:52 +0000 |
commit | 3e80ba3c4f2db828282a978ba6cf0f747216a340 (patch) | |
tree | 30a0c780489d4a2b2a0a7b0b6bc6902c06406621 /lisp/eshell | |
parent | 89bf74f828fc00e65e00ade6757bd08c50fc2f08 (diff) | |
download | emacs-3e80ba3c4f2db828282a978ba6cf0f747216a340.tar.gz |
(eshell-show-maximum-output): Don't use interactive-p.
(eshell-truncate-buffer): Just message, no error, if buffer is short.
Diffstat (limited to 'lisp/eshell')
-rw-r--r-- | lisp/eshell/esh-mode.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el index f76900bf482..ea9ae01a2f4 100644 --- a/lisp/eshell/esh-mode.el +++ b/lisp/eshell/esh-mode.el @@ -943,10 +943,11 @@ With a prefix argument, narrows region to last command output." (eshell-bol) (kill-region (point) here)))) -(defun eshell-show-maximum-output () - "Put the end of the buffer at the bottom of the window." - (interactive) - (if (interactive-p) +(defun eshell-show-maximum-output (&optional interactive) + "Put the end of the buffer at the bottom of the window. +When run interactively, widen the buffer first." + (interactive "p") + (if interactive (widen)) (goto-char (point-max)) (recenter -1)) @@ -1002,7 +1003,7 @@ a key." (let ((pos (point))) (if (bobp) (if (interactive-p) - (error "Buffer too short to truncate")) + (message "Buffer too short to truncate")) (delete-region (point-min) (point)) (if (interactive-p) (message "Truncated buffer from %d to %d lines (%.1fk freed)" |