diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0b277c7..409ca23 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2015-03-08 Vibhav Pant + + * eshell/esh-mode.el (eshell/clear): New function. + 2015-03-07 Stefan Monnier * battery.el (battery-echo-area-format): Simplify default. diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el index da83ec6..a1c71cc 100644 --- a/lisp/eshell/esh-mode.el +++ b/lisp/eshell/esh-mode.el @@ -902,6 +902,12 @@ When run interactively, widen the buffer first." (bury-buffer) (kill-buffer (current-buffer)))) +(defun eshell/clear () + "Clear the eshell buffer." + (let ((inhibit-read-only t)) + (erase-buffer) + (eshell-send-input))) + (defun eshell-truncate-buffer () "Truncate the buffer to `eshell-buffer-maximum-lines'. This function could be on `eshell-output-filter-functions' or bound to