Mercurial > emacs
comparison lisp/comint.el @ 5152:67b4642532bb
(comint-send-input): Don't call comint-arguments while
computing the value for history.
(comint-delim-arg): Treat quoted delim chars as non-delims.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 24 Nov 1993 05:12:36 +0000 |
parents | 23f6d57ced16 |
children | 7e66b092f331 |
comparison
equal
deleted
inserted
replaced
5151:8b31cff02267 | 5152:67b4642532bb |
---|---|
981 ;; a list of the arg, otherwise try and break up using characters in | 981 ;; a list of the arg, otherwise try and break up using characters in |
982 ;; comint-delimiter-argument-list. Returned list is backwards. | 982 ;; comint-delimiter-argument-list. Returned list is backwards. |
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 "\\|")) |
992 (args ()) (pos 0)) | 998 (args ()) (pos 0)) |
993 (while (or (eq pos (string-match not-delim arg pos)) | 999 (while (or (eq pos (string-match not-delim arg pos)) |
1078 (comint-arguments input 0 nil) | 1084 (comint-arguments input 0 nil) |
1079 ;; This is messy 'cos ultimately the original | 1085 ;; This is messy 'cos ultimately the original |
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)) |
1090 (if (and (funcall comint-input-filter history) | 1093 (if (and (funcall comint-input-filter history) |
1091 (or (null comint-input-ignoredups) | 1094 (or (null comint-input-ignoredups) |