emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: shell-quote-argument: make it behave as if on Unix?


From: Kim F. Storm
Subject: Re: shell-quote-argument: make it behave as if on Unix?
Date: 12 Apr 2002 13:43:20 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50

"Eli Zaretskii" <address@hidden> writes:

> > From: "Stefan Monnier" <monnier+gnu/address@hidden>
> > Date: Fri, 12 Apr 2002 00:09:43 -0400
> > 
> > -(defun shell-quote-argument (argument)
> > -  "Quote an argument for passing as argument to an inferior shell."
> > -  (if (eq system-type 'ms-dos)
> > +(defun shell-quote-argument (argument &optional shell-type)
> > +  "Quote an argument for passing as argument to an inferior shell.
> > +SHELL-TYPE is the type of shell to which this will be passed.
> > +It defaults to the value of `system-type'."
> > +  (unless shell-type (setq shell-type system-type))
> > +  (if (eq shell-type 'ms-dos)
> 
> This is what I had in mind, but I think `shell-type' is not a good
> name for that argument, since without reading the source of the
> function, I'd be tempted to use something like 'bash or 'command.com
> there instead of ms-dos or windows-nt.  I think system-type or os-type
> is better.  I also suggest to say in the doc string that the possible
> values are those used in the system-type variable.

Maybe `target-system-type' would be a sensible name for the parameter?
The doc string could the state:

TARGET-SYSTEM-TYPE is the `system-type' of the system where the quoted
argument will be interpreted.  It defaults to the value of `system-type'.

-- 
Kim F. Storm <address@hidden> http://www.cua.dk




reply via email to

[Prev in Thread] Current Thread [Next in Thread]