diff options
| author | Vibhav Pant | 2015-03-17 05:01:59 +0530 |
|---|---|---|
| committer | Vibhav Pant | 2015-03-17 05:01:59 +0530 |
| commit | ab4e4cc92c62051983f4ee5f1bf9c82440086451 (patch) | |
| tree | 6437b8243bbb4b74a9748fde80d86cd540f65f0c | |
| parent | 3eb4d23a7cdee6f763b5be4947f70a1040c25424 (diff) | |
| download | emacs-ab4e4cc92c62051983f4ee5f1bf9c82440086451.tar.gz emacs-ab4e4cc92c62051983f4ee5f1bf9c82440086451.zip | |
Add 'clear' functionality to eshell.
* eshell/esh-mode.el (eshell/clear): New function.
* etc/NEWS: Mention new built-in command.
| -rw-r--r-- | etc/NEWS | 4 | ||||
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/eshell/esh-mode.el | 7 |
3 files changed, 15 insertions, 0 deletions
| @@ -556,6 +556,10 @@ to avoid interfering with the kill ring. | |||
| 556 | allow overriding the regular expression that recognizes the ldapsearch | 556 | allow overriding the regular expression that recognizes the ldapsearch |
| 557 | command line's password prompt. | 557 | command line's password prompt. |
| 558 | 558 | ||
| 559 | ** Eshell | ||
| 560 | |||
| 561 | *** The new built-in command `clear' can scroll window contents out of sight. | ||
| 562 | |||
| 559 | +++ | 563 | +++ |
| 560 | ** tar-mode: new `tar-new-entry' command, allowing for new members to | 564 | ** tar-mode: new `tar-new-entry' command, allowing for new members to |
| 561 | be added to the archive. | 565 | be added to the archive. |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c6fab7fba3d..3af4bb20b04 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2015-03-16 Vibhav Pant <vibhavp@gmail.com> | ||
| 2 | |||
| 3 | * eshell/esh-mode.el (eshell/clear): New function. | ||
| 4 | |||
| 1 | 2015-03-16 Alan Mackenzie <acm@muc.de> | 5 | 2015-03-16 Alan Mackenzie <acm@muc.de> |
| 2 | 6 | ||
| 3 | Make Edebug work with Follow Mode. | 7 | Make Edebug work with Follow Mode. |
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el index da83ec6a6ab..15120cb61d4 100644 --- a/lisp/eshell/esh-mode.el +++ b/lisp/eshell/esh-mode.el | |||
| @@ -871,6 +871,13 @@ When run interactively, widen the buffer first." | |||
| 871 | (goto-char (point-max)) | 871 | (goto-char (point-max)) |
| 872 | (recenter -1)) | 872 | (recenter -1)) |
| 873 | 873 | ||
| 874 | (defun eshell/clear () | ||
| 875 | "Scroll contents of eshell window out of sight, leaving a blank window." | ||
| 876 | (interactive) | ||
| 877 | (let ((number-newlines (count-lines (window-start) (point)))) | ||
| 878 | (insert (make-string number-newlines ?\n))) | ||
| 879 | (eshell-send-input)) | ||
| 880 | |||
| 874 | (defun eshell-get-old-input (&optional use-current-region) | 881 | (defun eshell-get-old-input (&optional use-current-region) |
| 875 | "Return the command input on the current line." | 882 | "Return the command input on the current line." |
| 876 | (if use-current-region | 883 | (if use-current-region |