244 |
(const this)) |
(const this)) |
245 |
:group 'comint) |
:group 'comint) |
246 |
|
|
247 |
(defcustom comint-scroll-to-bottom-on-output nil |
(defcustom comint-move-point-for-output nil |
248 |
"*Controls whether interpreter output causes window to scroll. |
"*Controls whether interpreter output moves point to the end of the output. |
249 |
If nil, then do not scroll. If t or `all', scroll all windows showing buffer. |
If nil, then output never moves point to the output. |
250 |
If `this', scroll only the selected window. |
(If the output occurs at point, it is inserted before point.) |
251 |
If `others', scroll only those that are not the selected window. |
If t or `all', move point in all windows showing the buffer. |
252 |
|
If `this', move point only the selected window. |
253 |
|
If `others', move point only in other windows, not in the selected window. |
254 |
|
|
255 |
The default is nil. |
The default is nil. |
256 |
|
|
257 |
See variable `comint-scroll-show-maximum-output' and function |
See the variable `comint-scroll-show-maximum-output' and the function |
258 |
`comint-postoutput-scroll-to-bottom'. This variable is buffer-local." |
`comint-postoutput-scroll-to-bottom'. |
259 |
|
This variable is buffer-local in all comint buffers." |
260 |
:type '(choice (const :tag "off" nil) |
:type '(choice (const :tag "off" nil) |
261 |
(const t) |
(const t) |
262 |
(const all) |
(const all) |
264 |
(const others)) |
(const others)) |
265 |
:group 'comint) |
:group 'comint) |
266 |
|
|
267 |
(defcustom comint-scroll-show-maximum-output t |
(defvaralias 'comint-scroll-to-bottom-on-output 'comint-move-point-for-output) |
|
"*Controls how interpreter output causes window to scroll. |
|
|
If non-nil, then show the maximum output when the window is scrolled. |
|
268 |
|
|
269 |
See variable `comint-scroll-to-bottom-on-output' and function |
(defcustom comint-scroll-show-maximum-output t |
270 |
`comint-postoutput-scroll-to-bottom'. This variable is buffer-local." |
"*Controls how to scroll due to interpreter output. |
271 |
|
This 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) |
274 |
|
and output from the subprocess is inserted. |
275 |
|
|
276 |
|
Non-nil means scroll so that the window is full of text |
277 |
|
and point is on the last line. A value of nil |
278 |
|
means don't do anyting special--scroll normally. |
279 |
|
|
280 |
|
See also the variable `comint-move-point-for-output' and the function |
281 |
|
`comint-postoutput-scroll-to-bottom'. |
282 |
|
This variable is buffer-local in all comint buffers." |
283 |
:type 'boolean |
:type 'boolean |
284 |
:group 'comint) |
:group 'comint) |
285 |
|
|
443 |
(put 'comint-output-filter-functions 'permanent-local t) |
(put 'comint-output-filter-functions 'permanent-local t) |
444 |
(put 'comint-preoutput-filter-functions 'permanent-local t) |
(put 'comint-preoutput-filter-functions 'permanent-local t) |
445 |
(put 'comint-scroll-to-bottom-on-input 'permanent-local t) |
(put 'comint-scroll-to-bottom-on-input 'permanent-local t) |
446 |
(put 'comint-scroll-to-bottom-on-output 'permanent-local t) |
(put 'comint-move-point-for-output 'permanent-local t) |
447 |
(put 'comint-scroll-show-maximum-output 'permanent-local t) |
(put 'comint-scroll-show-maximum-output 'permanent-local t) |
448 |
(put 'comint-ptyp 'permanent-local t) |
(put 'comint-ptyp 'permanent-local t) |
449 |
|
|
477 |
Input to, and output from, the subprocess can cause the window to scroll to |
Input to, and output from, the subprocess can cause the window to scroll to |
478 |
the end of the buffer. See variables `comint-output-filter-functions', |
the end of the buffer. See variables `comint-output-filter-functions', |
479 |
`comint-preoutput-filter-functions', `comint-scroll-to-bottom-on-input', |
`comint-preoutput-filter-functions', `comint-scroll-to-bottom-on-input', |
480 |
and `comint-scroll-to-bottom-on-output'. |
and `comint-move-point-for-output'. |
481 |
|
|
482 |
If you accidentally suspend your process, use \\[comint-continue-subjob] |
If you accidentally suspend your process, use \\[comint-continue-subjob] |
483 |
to continue it. |
to continue it. |
512 |
(make-local-variable 'comint-input-sender) |
(make-local-variable 'comint-input-sender) |
513 |
(make-local-variable 'comint-eol-on-send) |
(make-local-variable 'comint-eol-on-send) |
514 |
(make-local-variable 'comint-scroll-to-bottom-on-input) |
(make-local-variable 'comint-scroll-to-bottom-on-input) |
515 |
(make-local-variable 'comint-scroll-to-bottom-on-output) |
(make-local-variable 'comint-move-point-for-output) |
516 |
(make-local-variable 'comint-scroll-show-maximum-output) |
(make-local-variable 'comint-scroll-show-maximum-output) |
517 |
;; This makes it really work to keep point at the bottom. |
;; This makes it really work to keep point at the bottom. |
518 |
(make-local-variable 'scroll-conservatively) |
(make-local-variable 'scroll-conservatively) |
749 |
(default-directory |
(default-directory |
750 |
(if (file-accessible-directory-p default-directory) |
(if (file-accessible-directory-p default-directory) |
751 |
default-directory |
default-directory |
752 |
(char-to-string directory-sep-char))) |
"/")) |
753 |
proc decoding encoding changed) |
proc decoding encoding changed) |
754 |
(let ((exec-path (if (file-name-directory command) |
(let ((exec-path (if (file-name-directory command) |
755 |
;; If the command has slashes, make sure we |
;; If the command has slashes, make sure we |
1739 |
nil t)))))) |
nil t)))))) |
1740 |
|
|
1741 |
(defun comint-postoutput-scroll-to-bottom (string) |
(defun comint-postoutput-scroll-to-bottom (string) |
1742 |
"Go to the end of buffer in all windows showing it. |
"Go to the end of buffer in some or all windows showing it. |
1743 |
Does not scroll if the current line is the last line in the buffer. |
Does not scroll if the current line is the last line in the buffer. |
1744 |
Depends on the value of `comint-scroll-to-bottom-on-output' and |
Depends on the value of `comint-move-point-for-output' and |
1745 |
`comint-scroll-show-maximum-output'. |
`comint-scroll-show-maximum-output'. |
1746 |
|
|
1747 |
This function should be in the list `comint-output-filter-functions'." |
This function should be in the list `comint-output-filter-functions'." |
1748 |
(let* ((selected (selected-window)) |
(let* ((selected (selected-window)) |
1749 |
(current (current-buffer)) |
(current (current-buffer)) |
1750 |
(process (get-buffer-process current)) |
(process (get-buffer-process current)) |
1751 |
(scroll comint-scroll-to-bottom-on-output)) |
(scroll comint-move-point-for-output)) |
1752 |
(unwind-protect |
(unwind-protect |
1753 |
(if process |
(if process |
1754 |
(walk-windows |
(walk-windows |
2082 |
between the process-mark and point." |
between the process-mark and point." |
2083 |
(interactive) |
(interactive) |
2084 |
(comint-skip-input) |
(comint-skip-input) |
2085 |
(interrupt-process nil comint-ptyp)) |
(interrupt-process nil comint-ptyp) |
2086 |
|
;; (process-send-string nil "\n") |
2087 |
|
) |
2088 |
|
|
2089 |
(defun comint-kill-subjob () |
(defun comint-kill-subjob () |
2090 |
"Send kill signal to the current subjob. |
"Send kill signal to the current subjob. |
2687 |
(dirsuffix (cond ((not comint-completion-addsuffix) |
(dirsuffix (cond ((not comint-completion-addsuffix) |
2688 |
"") |
"") |
2689 |
((not (consp comint-completion-addsuffix)) |
((not (consp comint-completion-addsuffix)) |
2690 |
(char-to-string directory-sep-char)) |
"/") |
2691 |
(t |
(t |
2692 |
(car comint-completion-addsuffix)))) |
(car comint-completion-addsuffix)))) |
2693 |
(filesuffix (cond ((not comint-completion-addsuffix) |
(filesuffix (cond ((not comint-completion-addsuffix) |