aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1998-03-02 19:02:28 +0000
committerRichard M. Stallman1998-03-02 19:02:28 +0000
commitec5691271b1d5675b9782dcb1090721ce6c43383 (patch)
tree2e6194420f5c5746c6c823a34249ecb1cefaec90
parent21323706226d50cf5ce8aad5ae3d2bd952685f2a (diff)
downloademacs-ec5691271b1d5675b9782dcb1090721ce6c43383.tar.gz
emacs-ec5691271b1d5675b9782dcb1090721ce6c43383.zip
(comint-arguments): Treat \" and such as part of one arg.
-rw-r--r--lisp/comint.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/lisp/comint.el b/lisp/comint.el
index 102cd1ec8c7..6c44a551123 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -1126,7 +1126,15 @@ We assume whitespace separates arguments, except within quotes.
1126Also, a run of one or more of a single character 1126Also, a run of one or more of a single character
1127in `comint-delimiter-argument-list' is a separate argument. 1127in `comint-delimiter-argument-list' is a separate argument.
1128Argument 0 is the command name." 1128Argument 0 is the command name."
1129 (let ((argpart "[^ \n\t\"'`]+\\|\\(\"[^\"]*\"\\|'[^']*'\\|`[^`]*`\\)") 1129 ;; The first line handles ordinary characters and backslash-sequences.
1130 ;; The second matches "-quoted strings.
1131 ;; The third matches '-quoted strings.
1132 ;; The fourth matches `-quoted strings.
1133 ;; This seems to fit the syntax of BASH 2.0.
1134 (let ((argpart "[^ \n\t\"'`\\]+\\|\\\\[\"'`\\]+\\|\
1135\\(\"\\([^\"\\]\\|\\\\.\\)*\"\\|\
1136'[^']*'\\|\
1137`[^`]*`\\)")
1130 (args ()) (pos 0) 1138 (args ()) (pos 0)
1131 (count 0) 1139 (count 0)
1132 beg str value quotes) 1140 beg str value quotes)