mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 04:10:54 -08:00
Add 'clear' functionality to eshell.
* eshell/esh-mode.el (eshell/clear): New function. * etc/NEWS: Mention new built-in command.
This commit is contained in:
parent
3eb4d23a7c
commit
ab4e4cc92c
3 changed files with 15 additions and 0 deletions
4
etc/NEWS
4
etc/NEWS
|
|
@ -556,6 +556,10 @@ to avoid interfering with the kill ring.
|
|||
allow overriding the regular expression that recognizes the ldapsearch
|
||||
command line's password prompt.
|
||||
|
||||
** Eshell
|
||||
|
||||
*** The new built-in command `clear' can scroll window contents out of sight.
|
||||
|
||||
+++
|
||||
** tar-mode: new `tar-new-entry' command, allowing for new members to
|
||||
be added to the archive.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
2015-03-16 Vibhav Pant <vibhavp@gmail.com>
|
||||
|
||||
* eshell/esh-mode.el (eshell/clear): New function.
|
||||
|
||||
2015-03-16 Alan Mackenzie <acm@muc.de>
|
||||
|
||||
Make Edebug work with Follow Mode.
|
||||
|
|
|
|||
|
|
@ -871,6 +871,13 @@ When run interactively, widen the buffer first."
|
|||
(goto-char (point-max))
|
||||
(recenter -1))
|
||||
|
||||
(defun eshell/clear ()
|
||||
"Scroll contents of eshell window out of sight, leaving a blank window."
|
||||
(interactive)
|
||||
(let ((number-newlines (count-lines (window-start) (point))))
|
||||
(insert (make-string number-newlines ?\n)))
|
||||
(eshell-send-input))
|
||||
|
||||
(defun eshell-get-old-input (&optional use-current-region)
|
||||
"Return the command input on the current line."
|
||||
(if use-current-region
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue