aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2003-06-03 11:06:42 +0000
committerRichard M. Stallman2003-06-03 11:06:42 +0000
commit3fceac6afa7149afa52f6a26a0c2d5e9d9a7eb91 (patch)
tree94eaa19cd8f6cbf33b2459fea5ff3a829dfbf6cf
parent0c3a466cb13b82707dde36de658fcb075289476d (diff)
downloademacs-3fceac6afa7149afa52f6a26a0c2d5e9d9a7eb91.tar.gz
emacs-3fceac6afa7149afa52f6a26a0c2d5e9d9a7eb91.zip
(comint-move-point-for-output): Renamed from
comint-scroll-to-bottom-on-output. Old name is alias. Doc fix. All uses changed. (comint-scroll-show-maximum-output): Doc fix. (comint-exec-1): Don't use directory-sep-char. (comint-dynamic-complete-as-filename): Likewise.
-rw-r--r--lisp/comint.el57
1 files changed, 36 insertions, 21 deletions
diff --git a/lisp/comint.el b/lisp/comint.el
index f7ea8194936..7834c091cbb 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -244,16 +244,19 @@ See `comint-preinput-scroll-to-bottom'. This variable is buffer-local."
244 (const this)) 244 (const this))
245 :group 'comint) 245 :group 'comint)
246 246
247(defcustom comint-scroll-to-bottom-on-output nil 247(defcustom comint-move-point-for-output nil
248 "*Controls whether interpreter output causes window to scroll. 248 "*Controls whether interpreter output moves point to the end of the output.
249If nil, then do not scroll. If t or `all', scroll all windows showing buffer. 249If nil, then output never moves point to the output.
250If `this', scroll only the selected window. 250 (If the output occurs at point, it is inserted before point.)
251If `others', scroll only those that are not the selected window. 251If t or `all', move point in all windows showing the buffer.
252If `this', move point only the selected window.
253If `others', move point only in other windows, not in the selected window.
252 254
253The default is nil. 255The default is nil.
254 256
255See variable `comint-scroll-show-maximum-output' and function 257See the variable `comint-scroll-show-maximum-output' and the function
256`comint-postoutput-scroll-to-bottom'. This variable is buffer-local." 258`comint-postoutput-scroll-to-bottom'.
259This variable is buffer-local in all comint buffers."
257 :type '(choice (const :tag "off" nil) 260 :type '(choice (const :tag "off" nil)
258 (const t) 261 (const t)
259 (const all) 262 (const all)
@@ -261,12 +264,22 @@ See variable `comint-scroll-show-maximum-output' and function
261 (const others)) 264 (const others))
262 :group 'comint) 265 :group 'comint)
263 266
264(defcustom comint-scroll-show-maximum-output t 267(defvaralias 'comint-scroll-to-bottom-on-output 'comint-move-point-for-output)
265 "*Controls how interpreter output causes window to scroll.
266If non-nil, then show the maximum output when the window is scrolled.
267 268
268See variable `comint-scroll-to-bottom-on-output' and function 269(defcustom comint-scroll-show-maximum-output t
269`comint-postoutput-scroll-to-bottom'. This variable is buffer-local." 270 "*Controls how to scroll due to interpreter output.
271This variable applies when point is at the end of the buffer
272\(either because it was originally there, or because
273`comint-move-point-for-output' said to move it there)
274and output from the subprocess is inserted.
275
276Non-nil means scroll so that the window is full of text
277and point is on the last line. A value of nil
278means don't do anyting special--scroll normally.
279
280See also the variable `comint-move-point-for-output' and the function
281`comint-postoutput-scroll-to-bottom'.
282This variable is buffer-local in all comint buffers."
270 :type 'boolean 283 :type 'boolean
271 :group 'comint) 284 :group 'comint)
272 285
@@ -430,7 +443,7 @@ The command \\[comint-accumulate] sets this.")
430(put 'comint-output-filter-functions 'permanent-local t) 443(put 'comint-output-filter-functions 'permanent-local t)
431(put 'comint-preoutput-filter-functions 'permanent-local t) 444(put 'comint-preoutput-filter-functions 'permanent-local t)
432(put 'comint-scroll-to-bottom-on-input 'permanent-local t) 445(put 'comint-scroll-to-bottom-on-input 'permanent-local t)
433(put 'comint-scroll-to-bottom-on-output 'permanent-local t) 446(put 'comint-move-point-for-output 'permanent-local t)
434(put 'comint-scroll-show-maximum-output 'permanent-local t) 447(put 'comint-scroll-show-maximum-output 'permanent-local t)
435(put 'comint-ptyp 'permanent-local t) 448(put 'comint-ptyp 'permanent-local t)
436 449
@@ -464,7 +477,7 @@ Commands with no default key bindings include `send-invisible',
464Input to, and output from, the subprocess can cause the window to scroll to 477Input to, and output from, the subprocess can cause the window to scroll to
465the end of the buffer. See variables `comint-output-filter-functions', 478the end of the buffer. See variables `comint-output-filter-functions',
466`comint-preoutput-filter-functions', `comint-scroll-to-bottom-on-input', 479`comint-preoutput-filter-functions', `comint-scroll-to-bottom-on-input',
467and `comint-scroll-to-bottom-on-output'. 480and `comint-move-point-for-output'.
468 481
469If you accidentally suspend your process, use \\[comint-continue-subjob] 482If you accidentally suspend your process, use \\[comint-continue-subjob]
470to continue it. 483to continue it.
@@ -499,7 +512,7 @@ Entry to this mode runs the hooks on `comint-mode-hook'."
499 (make-local-variable 'comint-input-sender) 512 (make-local-variable 'comint-input-sender)
500 (make-local-variable 'comint-eol-on-send) 513 (make-local-variable 'comint-eol-on-send)
501 (make-local-variable 'comint-scroll-to-bottom-on-input) 514 (make-local-variable 'comint-scroll-to-bottom-on-input)
502 (make-local-variable 'comint-scroll-to-bottom-on-output) 515 (make-local-variable 'comint-move-point-for-output)
503 (make-local-variable 'comint-scroll-show-maximum-output) 516 (make-local-variable 'comint-scroll-show-maximum-output)
504 ;; This makes it really work to keep point at the bottom. 517 ;; This makes it really work to keep point at the bottom.
505 (make-local-variable 'scroll-conservatively) 518 (make-local-variable 'scroll-conservatively)
@@ -736,7 +749,7 @@ buffer. The hook `comint-exec-hook' is run after each exec."
736 (default-directory 749 (default-directory
737 (if (file-accessible-directory-p default-directory) 750 (if (file-accessible-directory-p default-directory)
738 default-directory 751 default-directory
739 (char-to-string directory-sep-char))) 752 "/"))
740 proc decoding encoding changed) 753 proc decoding encoding changed)
741 (let ((exec-path (if (file-name-directory command) 754 (let ((exec-path (if (file-name-directory command)
742 ;; If the command has slashes, make sure we 755 ;; If the command has slashes, make sure we
@@ -1726,16 +1739,16 @@ This function should be a pre-command hook."
1726 nil t)))))) 1739 nil t))))))
1727 1740
1728(defun comint-postoutput-scroll-to-bottom (string) 1741(defun comint-postoutput-scroll-to-bottom (string)
1729 "Go to the end of buffer in all windows showing it. 1742 "Go to the end of buffer in some or all windows showing it.
1730Does not scroll if the current line is the last line in the buffer. 1743Does not scroll if the current line is the last line in the buffer.
1731Depends on the value of `comint-scroll-to-bottom-on-output' and 1744Depends on the value of `comint-move-point-for-output' and
1732`comint-scroll-show-maximum-output'. 1745`comint-scroll-show-maximum-output'.
1733 1746
1734This function should be in the list `comint-output-filter-functions'." 1747This function should be in the list `comint-output-filter-functions'."
1735 (let* ((selected (selected-window)) 1748 (let* ((selected (selected-window))
1736 (current (current-buffer)) 1749 (current (current-buffer))
1737 (process (get-buffer-process current)) 1750 (process (get-buffer-process current))
1738 (scroll comint-scroll-to-bottom-on-output)) 1751 (scroll comint-move-point-for-output))
1739 (unwind-protect 1752 (unwind-protect
1740 (if process 1753 (if process
1741 (walk-windows 1754 (walk-windows
@@ -2069,7 +2082,9 @@ This command also kills the pending input
2069between the process-mark and point." 2082between the process-mark and point."
2070 (interactive) 2083 (interactive)
2071 (comint-skip-input) 2084 (comint-skip-input)
2072 (interrupt-process nil comint-ptyp)) 2085 (interrupt-process nil comint-ptyp)
2086;; (process-send-string nil "\n")
2087 )
2073 2088
2074(defun comint-kill-subjob () 2089(defun comint-kill-subjob ()
2075 "Send kill signal to the current subjob. 2090 "Send kill signal to the current subjob.
@@ -2672,7 +2687,7 @@ See `comint-dynamic-complete-filename'. Returns t if successful."
2672 (dirsuffix (cond ((not comint-completion-addsuffix) 2687 (dirsuffix (cond ((not comint-completion-addsuffix)
2673 "") 2688 "")
2674 ((not (consp comint-completion-addsuffix)) 2689 ((not (consp comint-completion-addsuffix))
2675 (char-to-string directory-sep-char)) 2690 "/")
2676 (t 2691 (t
2677 (car comint-completion-addsuffix)))) 2692 (car comint-completion-addsuffix))))
2678 (filesuffix (cond ((not comint-completion-addsuffix) 2693 (filesuffix (cond ((not comint-completion-addsuffix)