diff options
author | Richard M. Stallman <rms@gnu.org> | 1993-11-25 04:14:10 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1993-11-25 04:14:10 +0000 |
commit | 5f46b51a31e37267fffae906afcab3eee582e84b (patch) | |
tree | 14768112a189784ada52560a74044bcd9a5a478b | |
parent | 855885711fdce9952cbf7934403cf3774d2ef6a4 (diff) | |
download | emacs-5f46b51a31e37267fffae906afcab3eee582e84b.tar.gz emacs-5f46b51a31e37267fffae906afcab3eee582e84b.tar.bz2 emacs-5f46b51a31e37267fffae906afcab3eee582e84b.zip |
(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.
-rw-r--r-- | lisp/comint.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/comint.el b/lisp/comint.el index 03cc7d35782..8d8c0623a76 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1081,12 +1081,15 @@ Similarly for Soar, Scheme, etc." (comint-replace-by-expanded-history) (buffer-substring pmark (point)))) (history (if (not (eq comint-input-autoexpand 'history)) - (comint-arguments input 0 nil) + input ;; This is messy 'cos ultimately the original ;; functions used do insertion, rather than return ;; strings. We have to expand, then insert back. (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 (delete-region pmark (point)) (insert ?\n)) |