changeset 5166:7e66b092f331

(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.
author Richard M. Stallman <rms@gnu.org>
date Thu, 25 Nov 1993 04:14:10 +0000
parents 619c0a9ddf86
children 6ac5c999a7cc
files lisp/comint.el
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/comint.el	Thu Nov 25 03:59:28 1993 +0000
+++ b/lisp/comint.el	Thu Nov 25 04:14:10 1993 +0000
@@ -1081,12 +1081,15 @@
 			(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))