# HG changeset patch # User Richard M. Stallman # Date 1099562752 0 # Node ID 7cab04dc2b652618f7a502eb36e616399d7489cf # Parent fad95a27e1d85588bbbddfd0ba397b0bc9f27792 (eshell-show-maximum-output): Don't use interactive-p. (eshell-truncate-buffer): Just message, no error, if buffer is short. diff -r fad95a27e1d8 -r 7cab04dc2b65 lisp/eshell/esh-mode.el --- a/lisp/eshell/esh-mode.el Thu Nov 04 10:04:16 2004 +0000 +++ b/lisp/eshell/esh-mode.el Thu Nov 04 10:05:52 2004 +0000 @@ -943,10 +943,11 @@ (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 @@ (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)"