(comint-send-input): Don't call comint-arguments

to set HISTORY, even if comint-input-autoexpand is not `history'.
When comint-input-autoexpand is `history', undo part of prev change:
do put INPUT back in the buffer in place of expanded hist.
This commit is contained in:
Richard M. Stallman 1993-11-25 04:14:10 +00:00
parent 855885711f
commit 5f46b51a31

View file

@ -1081,12 +1081,15 @@ Similarly for Soar, Scheme, etc."
(comint-replace-by-expanded-history) (comint-replace-by-expanded-history)
(buffer-substring pmark (point)))) (buffer-substring pmark (point))))
(history (if (not (eq comint-input-autoexpand 'history)) (history (if (not (eq comint-input-autoexpand 'history))
(comint-arguments input 0 nil) input
;; This is messy 'cos ultimately the original ;; This is messy 'cos ultimately the original
;; functions used do insertion, rather than return ;; functions used do insertion, rather than return
;; strings. We have to expand, then insert back. ;; strings. We have to expand, then insert back.
(comint-replace-by-expanded-history) (comint-replace-by-expanded-history)
(buffer-substring pmark (point))))) (let ((copy (buffer-substring pmark (point))))
(delete-region pmark (point))
(insert input)
copy))))
(if comint-process-echoes (if comint-process-echoes
(delete-region pmark (point)) (delete-region pmark (point))
(insert ?\n)) (insert ?\n))