aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2000-10-26 00:46:47 +0000
committerMiles Bader2000-10-26 00:46:47 +0000
commit44016d251b76d2e3c47e433a1e2b615c6f3284bc (patch)
treeafd0feacb1512cb4a50fdc9ac4ab7b357babdfba
parent0161849810909a9971a78f298e3da2d0dc36d15a (diff)
downloademacs-44016d251b76d2e3c47e433a1e2b615c6f3284bc.tar.gz
emacs-44016d251b76d2e3c47e433a1e2b615c6f3284bc.zip
(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.
-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'."
521 (make-local-variable 'comint-file-name-quote-list) 521 (make-local-variable 'comint-file-name-quote-list)
522 (make-local-variable 'comint-accum-marker) 522 (make-local-variable 'comint-accum-marker)
523 (setq comint-accum-marker (make-marker)) 523 (setq comint-accum-marker (make-marker))
524 (set-marker comint-accum-marker nil)) 524 (set-marker comint-accum-marker nil)
525 ;; This behavior is not useful in comint buffers, and is annoying
526 (set (make-local-variable 'next-line-add-newlines) nil))
525 527
526(if comint-mode-map 528(if comint-mode-map
527 nil 529 nil
@@ -574,10 +576,10 @@ Entry to this mode runs the hooks on `comint-mode-hook'."
574 (cons "In/Out" (make-sparse-keymap "In/Out"))) 576 (cons "In/Out" (make-sparse-keymap "In/Out")))
575 (define-key comint-mode-map [menu-bar inout delete-output] 577 (define-key comint-mode-map [menu-bar inout delete-output]
576 '("Delete Current Output Group" . comint-delete-output)) 578 '("Delete Current Output Group" . comint-delete-output))
577 (define-key comint-mode-map [menu-bar inout write-output]
578 '("Write Current Output Group to File" . comint-write-output))
579 (define-key comint-mode-map [menu-bar inout append-output-to-file] 579 (define-key comint-mode-map [menu-bar inout append-output-to-file]
580 '("Append Current Output Group to File" . comint-append-output-to-file)) 580 '("Append Current Output Group to File" . comint-append-output-to-file))
581 (define-key comint-mode-map [menu-bar inout write-output]
582 '("Write Current Output Group to File" . comint-write-output))
581 (define-key comint-mode-map [menu-bar inout next-prompt] 583 (define-key comint-mode-map [menu-bar inout next-prompt]
582 '("Forward Output Group" . comint-next-prompt)) 584 '("Forward Output Group" . comint-next-prompt))
583 (define-key comint-mode-map [menu-bar inout previous-prompt] 585 (define-key comint-mode-map [menu-bar inout previous-prompt]
@@ -1915,6 +1917,14 @@ otherwise."
1915 (write-region comint-last-input-end (point) filename 1917 (write-region comint-last-input-end (point) filename
1916 append nil nil mustbenew))) 1918 append nil nil mustbenew)))
1917 1919
1920;; This function exists for the benefit of the menu; from the keyboard,
1921;; users can just use `comint-write-output' with a prefix arg.
1922(defun comint-append-output-to-file (filename)
1923 "Append output from interpreter since last input to FILENAME.
1924Any prompt at the end of the output is not written."
1925 (interactive "fAppend output to file: ")
1926 (comint-write-output filename t))
1927
1918(defun comint-show-output () 1928(defun comint-show-output ()
1919 "Display start of this batch of interpreter output at top of window. 1929 "Display start of this batch of interpreter output at top of window.
1920Sets mark to the value of point when this command is run." 1930Sets mark to the value of point when this command is run."