Mercurial > emacs
changeset 32892:25182c4fd302
(comint-mode): Locally set `next-line-add-newlines' to nil.
(comint-mode-map): Reverse order of `comint-write-output' and
`comint-append-output-to-file'.
(comint-append-output-to-file): Reinstate this function, for the
benefit of the menu.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Thu, 26 Oct 2000 00:46:47 +0000 |
parents | 56a4ce418f35 |
children | 7306d81dd8bc |
files | lisp/comint.el |
diffstat | 1 files changed, 13 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/comint.el Thu Oct 26 00:45:01 2000 +0000 +++ b/lisp/comint.el Thu Oct 26 00:46:47 2000 +0000 @@ -521,7 +521,9 @@ (make-local-variable 'comint-file-name-quote-list) (make-local-variable 'comint-accum-marker) (setq comint-accum-marker (make-marker)) - (set-marker comint-accum-marker nil)) + (set-marker comint-accum-marker nil) + ;; This behavior is not useful in comint buffers, and is annoying + (set (make-local-variable 'next-line-add-newlines) nil)) (if comint-mode-map nil @@ -574,10 +576,10 @@ (cons "In/Out" (make-sparse-keymap "In/Out"))) (define-key comint-mode-map [menu-bar inout delete-output] '("Delete Current Output Group" . comint-delete-output)) + (define-key comint-mode-map [menu-bar inout append-output-to-file] + '("Append Current Output Group to File" . comint-append-output-to-file)) (define-key comint-mode-map [menu-bar inout write-output] '("Write Current Output Group to File" . comint-write-output)) - (define-key comint-mode-map [menu-bar inout append-output-to-file] - '("Append Current Output Group to File" . comint-append-output-to-file)) (define-key comint-mode-map [menu-bar inout next-prompt] '("Forward Output Group" . comint-next-prompt)) (define-key comint-mode-map [menu-bar inout previous-prompt] @@ -1915,6 +1917,14 @@ (write-region comint-last-input-end (point) filename append nil nil mustbenew))) +;; This function exists for the benefit of the menu; from the keyboard, +;; users can just use `comint-write-output' with a prefix arg. +(defun comint-append-output-to-file (filename) + "Append output from interpreter since last input to FILENAME. +Any prompt at the end of the output is not written." + (interactive "fAppend output to file: ") + (comint-write-output filename t)) + (defun comint-show-output () "Display start of this batch of interpreter output at top of window. Sets mark to the value of point when this command is run."