(comint-send-input): Handle comint-process-echoes
differently.
This commit is contained in:
parent
70569550f7
commit
c9e74cd4be
2 changed files with 31 additions and 5 deletions
|
@ -1,10 +1,15 @@
|
|||
2001-09-07 Dr Francis J. Wright <F.J.Wright@qmw.ac.uk>
|
||||
|
||||
* comint.el (comint-send-input): Handle comint-process-echoes
|
||||
differently.
|
||||
|
||||
2001-09-07 Eli Zaretskii <eliz@is.elta.co.il>
|
||||
|
||||
* arc-mode.el (archive-dostime): Fix a typo in minutes'
|
||||
computation.
|
||||
|
||||
2001-09-07 Gerd Moellmann <gerd@gnu.org>
|
||||
|
||||
|
||||
* server.el (server-switch-buffer): Use get-window-with-predicate.
|
||||
|
||||
* textmodes/refer.el (refer-find-entry-internal): Use
|
||||
|
|
|
@ -1422,9 +1422,7 @@ Similarly for Soar, Scheme, etc."
|
|||
(delete-region pmark start)
|
||||
copy))))
|
||||
|
||||
(if comint-process-echoes
|
||||
(delete-region pmark (point))
|
||||
(insert ?\n))
|
||||
(insert ?\n)
|
||||
|
||||
(comint-add-to-input-history history)
|
||||
|
||||
|
@ -1469,6 +1467,29 @@ Similarly for Soar, Scheme, etc."
|
|||
;; clear the "accumulation" marker
|
||||
(set-marker comint-accum-marker nil)
|
||||
(funcall comint-input-sender proc input)
|
||||
|
||||
;; Optionally delete echoed input (after checking it).
|
||||
(if comint-process-echoes
|
||||
(let* ((echo-len (- comint-last-input-end
|
||||
comint-last-input-start))
|
||||
(echo-end (+ comint-last-input-end echo-len)))
|
||||
;; Wait for all input to be echoed:
|
||||
(while (and (accept-process-output proc)
|
||||
(> echo-end (point-max))
|
||||
(= 0 (compare-buffer-substrings
|
||||
nil comint-last-input-start
|
||||
(- (point-max) echo-len)
|
||||
;; Above difference is equivalent to
|
||||
;; (+ comint-last-input-start
|
||||
;; (- (point-max) comint-last-input-end))
|
||||
nil comint-last-input-end (point-max)))))
|
||||
(if (and
|
||||
(<= echo-end (point-max))
|
||||
(= 0 (compare-buffer-substrings
|
||||
nil comint-last-input-start comint-last-input-end
|
||||
nil comint-last-input-end echo-end)))
|
||||
(delete-region comint-last-input-end echo-end))))
|
||||
|
||||
;; This used to call comint-output-filter-functions,
|
||||
;; but that scrolled the buffer in undesirable ways.
|
||||
(run-hook-with-args 'comint-output-filter-functions "")))))
|
||||
|
@ -1540,7 +1561,7 @@ This function should be in the list `comint-output-filter-functions'."
|
|||
(delete-char -2)))))))))
|
||||
|
||||
(add-hook 'comint-output-filter-functions 'comint-carriage-motion)
|
||||
|
||||
|
||||
;; The purpose of using this filter for comint processes
|
||||
;; is to keep comint-last-input-end from moving forward
|
||||
;; when output is inserted.
|
||||
|
|
Loading…
Add table
Reference in a new issue