Commit 44016d25 authored by Miles Bader's avatar Miles Bader
Browse files

(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.
parent 01618498
......@@ -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."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment