From: Miles Bader Date: Thu, 26 Oct 2000 00:46:47 +0000 (+0000) Subject: (comint-mode): Locally set `next-line-add-newlines' to nil. X-Git-Tag: emacs-pretest-21.0.90~565 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=44016d251b76d2e3c47e433a1e2b615c6f3284bc;p=emacs.git (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. --- diff --git a/lisp/comint.el b/lisp/comint.el index a3cc276c0aa..8b23aa62b28 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -521,7 +521,9 @@ Entry to this mode runs the hooks on `comint-mode-hook'." (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 @@ Entry to this mode runs the hooks on `comint-mode-hook'." (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 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 write-output] + '("Write Current Output Group to File" . comint-write-output)) (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 @@ otherwise." (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."