diff options
| author | Bozhidar Batsov | 2015-02-22 08:01:08 +0200 |
|---|---|---|
| committer | Bozhidar Batsov | 2015-02-24 08:53:04 +0200 |
| commit | eaf9499a7fe485a57ab54c665f0548d4eb1a2e88 (patch) | |
| tree | 6ee0e3e591ad51e2db8a92969b79ac7bb0ee7fe6 | |
| parent | ed7005c0e974a43c9b63d6f5d8ef6bd4099ba449 (diff) | |
| download | emacs-eaf9499a7fe485a57ab54c665f0548d4eb1a2e88.tar.gz emacs-eaf9499a7fe485a57ab54c665f0548d4eb1a2e88.zip | |
Add new interactive command comint-clear-buffer
The command clears the entire comint buffer. It's bound to C-c M-o.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/comint.el | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d401852eeeb..7e7bbb7486a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2015-02-24 Bozhidar Batsov <bozhidar@batsov.com> | ||
| 2 | |||
| 3 | * comint.el (comint-clear-buffer): New command. | ||
| 4 | (comint-mode-map): Bind `comint-clear-buffer' to 'C-c M-o'. | ||
| 5 | |||
| 1 | 2015-02-23 Pete Williamson <petewil0@googlemail.com> (tiny change) | 6 | 2015-02-23 Pete Williamson <petewil0@googlemail.com> (tiny change) |
| 2 | 7 | ||
| 3 | Use ${EXEEXT} more uniformly in makefiles | 8 | Use ${EXEEXT} more uniformly in makefiles |
diff --git a/lisp/comint.el b/lisp/comint.el index 30c4dda5c0f..30aece14332 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -472,6 +472,7 @@ executed once when the buffer is created." | |||
| 472 | (define-key map "\C-c\C-\\" 'comint-quit-subjob) | 472 | (define-key map "\C-c\C-\\" 'comint-quit-subjob) |
| 473 | (define-key map "\C-c\C-m" 'comint-copy-old-input) | 473 | (define-key map "\C-c\C-m" 'comint-copy-old-input) |
| 474 | (define-key map "\C-c\C-o" 'comint-delete-output) | 474 | (define-key map "\C-c\C-o" 'comint-delete-output) |
| 475 | (defile-key map "\C-c\M-o" 'comint-clear-buffer) | ||
| 475 | (define-key map "\C-c\C-r" 'comint-show-output) | 476 | (define-key map "\C-c\C-r" 'comint-show-output) |
| 476 | (define-key map "\C-c\C-e" 'comint-show-maximum-output) | 477 | (define-key map "\C-c\C-e" 'comint-show-maximum-output) |
| 477 | (define-key map "\C-c\C-l" 'comint-dynamic-list-input-ring) | 478 | (define-key map "\C-c\C-l" 'comint-dynamic-list-input-ring) |
| @@ -2428,6 +2429,11 @@ Sets mark to the value of point when this command is run." | |||
| 2428 | (goto-char (field-beginning pos)) | 2429 | (goto-char (field-beginning pos)) |
| 2429 | (set-window-start (selected-window) (point)))))) | 2430 | (set-window-start (selected-window) (point)))))) |
| 2430 | 2431 | ||
| 2432 | (defun comint-clear-buffer () | ||
| 2433 | "Clear the comint buffer." | ||
| 2434 | (interactive) | ||
| 2435 | (let ((comint-buffer-maximum-size 0)) | ||
| 2436 | (comint-truncate-buffer))) | ||
| 2431 | 2437 | ||
| 2432 | (defun comint-interrupt-subjob () | 2438 | (defun comint-interrupt-subjob () |
| 2433 | "Interrupt the current subjob. | 2439 | "Interrupt the current subjob. |