diff options
| author | Richard M. Stallman | 1993-11-24 05:12:36 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-11-24 05:12:36 +0000 |
| commit | 33956d30b724eec752f7315ffc2ced2ff8d1a9e0 (patch) | |
| tree | 23507bc06e0b06bde51c6d44f5af225013be0cc5 | |
| parent | 043efc41eb942f4712b83bf93f4193767ff842b5 (diff) | |
| download | emacs-33956d30b724eec752f7315ffc2ced2ff8d1a9e0.tar.gz emacs-33956d30b724eec752f7315ffc2ced2ff8d1a9e0.zip | |
(comint-send-input): Don't call comint-arguments while
computing the value for history.
(comint-delim-arg): Treat quoted delim chars as non-delims.
| -rw-r--r-- | lisp/comint.el | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lisp/comint.el b/lisp/comint.el index d9e48f19734..03cc7d35782 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -983,9 +983,15 @@ Quotes are single and double." | |||
| 983 | (if (or (null comint-delimiter-argument-list) | 983 | (if (or (null comint-delimiter-argument-list) |
| 984 | (string-match "[\"\'\`]" arg)) | 984 | (string-match "[\"\'\`]" arg)) |
| 985 | (list arg) | 985 | (list arg) |
| 986 | (let ((not-delim (format "[^%s]+" (mapconcat | 986 | (let ((not-delim (concat |
| 987 | (function (lambda (d) (regexp-quote d))) | 987 | (format "\\([^%s]" (mapconcat |
| 988 | comint-delimiter-argument-list ""))) | 988 | (function (lambda (d) (regexp-quote d))) |
| 989 | comint-delimiter-argument-list "")) | ||
| 990 | "\\|" | ||
| 991 | (mapconcat (function (lambda (d) | ||
| 992 | (concat "\\\\" (regexp-quote d)))) | ||
| 993 | comint-delimiter-argument-list "\\|") | ||
| 994 | "\\)+")) | ||
| 989 | (delim-str (mapconcat (function (lambda (d) | 995 | (delim-str (mapconcat (function (lambda (d) |
| 990 | (concat (regexp-quote d) "+"))) | 996 | (concat (regexp-quote d) "+"))) |
| 991 | comint-delimiter-argument-list "\\|")) | 997 | comint-delimiter-argument-list "\\|")) |
| @@ -1080,10 +1086,7 @@ Similarly for Soar, Scheme, etc." | |||
| 1080 | ;; functions used do insertion, rather than return | 1086 | ;; functions used do insertion, rather than return |
| 1081 | ;; strings. We have to expand, then insert back. | 1087 | ;; strings. We have to expand, then insert back. |
| 1082 | (comint-replace-by-expanded-history) | 1088 | (comint-replace-by-expanded-history) |
| 1083 | (let ((copy (buffer-substring pmark (point)))) | 1089 | (buffer-substring pmark (point))))) |
| 1084 | (delete-region pmark (point)) | ||
| 1085 | (insert input) | ||
| 1086 | (comint-arguments copy 0 nil))))) | ||
| 1087 | (if comint-process-echoes | 1090 | (if comint-process-echoes |
| 1088 | (delete-region pmark (point)) | 1091 | (delete-region pmark (point)) |
| 1089 | (insert ?\n)) | 1092 | (insert ?\n)) |