From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: shell-quote-argument: make it behave as if on Unix? Date: 12 Apr 2002 13:43:20 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: <5x8z7t16sn.fsf@kfs2.cua.dk> References: <2950-Wed10Apr2002195652+0300-eliz@is.elta.co.il> <200204120311.g3C3Bjg22167@aztec.santafe.edu> <200204120409.g3C49h707814@rum.cs.yale.edu> <5567-Fri12Apr2002131610+0300-eliz@is.elta.co.il> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1018616239 21713 127.0.0.1 (12 Apr 2002 12:57:19 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 12 Apr 2002 12:57:19 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16w0cB-0005e6-00 for ; Fri, 12 Apr 2002 14:57:19 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 16w0sS-0007df-00 for ; Fri, 12 Apr 2002 15:14:08 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16w0c5-0005xq-00; Fri, 12 Apr 2002 08:57:13 -0400 Original-Received: from delysid.gnu.org ([158.121.106.20]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16w0Z6-0005a8-00 for ; Fri, 12 Apr 2002 08:54:08 -0400 Original-Received: from mail.filanet.dk ([195.215.206.179]) by delysid.gnu.org with smtp (Exim 3.34 #2) id 16vyVm-0005qf-00 for ; Fri, 12 Apr 2002 06:42:35 -0400 Original-Received: from kfs2.cua.dk.cua.dk (kfs2.local.filanet.dk [192.168.1.182]) by mail.filanet.dk (Postfix) with SMTP id 2B6A77C047 for ; Fri, 12 Apr 2002 10:42:29 +0000 (GMT) Original-To: emacs-devel@gnu.org In-Reply-To: <5567-Fri12Apr2002131610+0300-eliz@is.elta.co.il> Original-Lines: 30 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:2579 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:2579 "Eli Zaretskii" writes: > > From: "Stefan Monnier" > > 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 http://www.cua.dk