summaryrefslogtreecommitdiff
path: root/lisp/comint.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2000-10-26 00:46:47 +0000
committerMiles Bader <miles@gnu.org>2000-10-26 00:46:47 +0000
commit44016d251b76d2e3c47e433a1e2b615c6f3284bc (patch)
treeafd0feacb1512cb4a50fdc9ac4ab7b357babdfba /lisp/comint.el
parent0161849810909a9971a78f298e3da2d0dc36d15a (diff)
downloademacs-44016d251b76d2e3c47e433a1e2b615c6f3284bc.tar.gz
(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.
Diffstat (limited to 'lisp/comint.el')
-rw-r--r--lisp/comint.el16
1 files changed, 13 insertions, 3 deletions
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."