diff options
Diffstat (limited to 'lisp/comint.el')
| -rw-r--r-- | lisp/comint.el | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lisp/comint.el b/lisp/comint.el index 26b0add8b76..2653728fa4e 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -653,7 +653,7 @@ Entry to this mode runs the hooks on `comint-mode-hook'." | |||
| 653 | (make-local-variable 'comint-accum-marker) | 653 | (make-local-variable 'comint-accum-marker) |
| 654 | (setq comint-accum-marker (make-marker)) | 654 | (setq comint-accum-marker (make-marker)) |
| 655 | (make-local-variable 'font-lock-defaults) | 655 | (make-local-variable 'font-lock-defaults) |
| 656 | (setq font-lock-defaults '(nil)) | 656 | (setq font-lock-defaults '(nil t)) |
| 657 | (add-hook 'change-major-mode-hook 'font-lock-defontify nil t) | 657 | (add-hook 'change-major-mode-hook 'font-lock-defontify nil t) |
| 658 | ;; This behavior is not useful in comint buffers, and is annoying | 658 | ;; This behavior is not useful in comint buffers, and is annoying |
| 659 | (set (make-local-variable 'next-line-add-newlines) nil)) | 659 | (set (make-local-variable 'next-line-add-newlines) nil)) |
| @@ -1920,6 +1920,17 @@ Calls `comint-get-old-input' to get old input." | |||
| 1920 | (goto-char (process-mark process)) | 1920 | (goto-char (process-mark process)) |
| 1921 | (insert input)))) | 1921 | (insert input)))) |
| 1922 | 1922 | ||
| 1923 | (defun comint-copy-old-input () | ||
| 1924 | "Insert after prompt old input at point as new input to be edited. | ||
| 1925 | Calls `comint-get-old-input' to get old input." | ||
| 1926 | (interactive) | ||
| 1927 | (let ((input (funcall comint-get-old-input)) | ||
| 1928 | (process (get-buffer-process (current-buffer)))) | ||
| 1929 | (if (not process) | ||
| 1930 | (error "Current buffer has no process") | ||
| 1931 | (goto-char (process-mark process)) | ||
| 1932 | (insert input)))) | ||
| 1933 | |||
| 1923 | (defun comint-skip-prompt () | 1934 | (defun comint-skip-prompt () |
| 1924 | "Skip past the text matching regexp `comint-prompt-regexp'. | 1935 | "Skip past the text matching regexp `comint-prompt-regexp'. |
| 1925 | If this takes us past the end of the current line, don't skip at all." | 1936 | If this takes us past the end of the current line, don't skip at all." |