]> git.eshelyaron.com Git - emacs.git/commitdiff
(eshell-show-maximum-output): Don't use interactive-p.
authorRichard M. Stallman <rms@gnu.org>
Thu, 4 Nov 2004 10:05:52 +0000 (10:05 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 4 Nov 2004 10:05:52 +0000 (10:05 +0000)
(eshell-truncate-buffer): Just message, no error, if buffer is short.

lisp/eshell/esh-mode.el

index f76900bf48211c9e6df5fe26ecc44f7da650d9a6..ea9ae01a2f48b558c647e430c4730f8677ff9efd 100644 (file)
@@ -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)"