Mercurial > emacs
changeset 21018:edbd4156cf68
(comint-arguments): Treat \" and such as part of one arg.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 02 Mar 1998 19:02:28 +0000 |
parents | 1ecfba12016a |
children | e649ff36d717 |
files | lisp/comint.el |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/comint.el Mon Mar 02 18:53:21 1998 +0000 +++ b/lisp/comint.el Mon Mar 02 19:02:28 1998 +0000 @@ -1126,7 +1126,15 @@ Also, a run of one or more of a single character in `comint-delimiter-argument-list' is a separate argument. Argument 0 is the command name." - (let ((argpart "[^ \n\t\"'`]+\\|\\(\"[^\"]*\"\\|'[^']*'\\|`[^`]*`\\)") + ;; The first line handles ordinary characters and backslash-sequences. + ;; The second matches "-quoted strings. + ;; The third matches '-quoted strings. + ;; The fourth matches `-quoted strings. + ;; This seems to fit the syntax of BASH 2.0. + (let ((argpart "[^ \n\t\"'`\\]+\\|\\\\[\"'`\\]+\\|\ +\\(\"\\([^\"\\]\\|\\\\.\\)*\"\\|\ +'[^']*'\\|\ +`[^`]*`\\)") (args ()) (pos 0) (count 0) beg str value quotes)