diff options
| -rw-r--r-- | lisp/comint.el | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lisp/comint.el b/lisp/comint.el index db45520f597..9f09a738c81 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -279,6 +279,10 @@ Entry to this mode runs the hooks on comint-mode-hook" | |||
| 279 | ; (define-key comint-mode-map "\eP" 'comint-msearch-input) | 279 | ; (define-key comint-mode-map "\eP" 'comint-msearch-input) |
| 280 | ; (define-key comint-mode-map "\eN" 'comint-psearch-input) | 280 | ; (define-key comint-mode-map "\eN" 'comint-psearch-input) |
| 281 | ; (define-key comint-mode-map "\C-cR" 'comint-msearch-input-matching) | 281 | ; (define-key comint-mode-map "\C-cR" 'comint-msearch-input-matching) |
| 282 | (define-key comint-mode-map "\C-c\C-n" 'comint-next-prompt) | ||
| 283 | (define-key comint-mode-map "\C-c\C-p" 'comint-prev-prompt) | ||
| 284 | (define-key comint-mode-map "\C-c\C-d" 'comint-send-eof) | ||
| 285 | (define-key comint-mode-map "\C-c\C-y" 'comint-previous-input) ;v18 binding | ||
| 282 | ) | 286 | ) |
| 283 | 287 | ||
| 284 | 288 | ||
| @@ -899,8 +903,29 @@ Useful if you accidentally suspend the top-level process." | |||
| 899 | (process-send-eof) | 903 | (process-send-eof) |
| 900 | (delete-char arg))) | 904 | (delete-char arg))) |
| 901 | 905 | ||
| 906 | (defun comint-send-eof () | ||
| 907 | "Send an EOF to the current buffer's process." | ||
| 908 | (interactive) | ||
| 909 | (process-send-eof)) | ||
| 902 | 910 | ||
| 911 | (defun comint-next-prompt (n) | ||
| 912 | "\ | ||
| 913 | Move to end of next prompt in the buffer (with prefix arg, Nth next). | ||
| 914 | See `comint-prompt-regexp'." | ||
| 915 | (interactive "p") | ||
| 916 | (re-search-forward comint-prompt-regexp nil nil n)) | ||
| 903 | 917 | ||
| 918 | (defun comint-prev-prompt (n) | ||
| 919 | "\ | ||
| 920 | Move to end of previous prompt in the buffer (with prefix arg, Nth previous). | ||
| 921 | See `comint-prompt-regexp'." | ||
| 922 | (interactive "p") | ||
| 923 | (if (= (save-excursion (re-search-backward comint-prompt-regexp nil t) | ||
| 924 | (match-end 0)) | ||
| 925 | (point)) | ||
| 926 | (setq n (1+ n))) | ||
| 927 | (re-search-backward comint-prompt-regexp nil nil n) | ||
| 928 | (goto-char (match-end 0))) | ||
| 904 | 929 | ||
| 905 | ;;; Support for source-file processing commands. | 930 | ;;; Support for source-file processing commands. |
| 906 | ;;;============================================================================ | 931 | ;;;============================================================================ |