From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Eli Zaretskii" Newsgroups: gmane.emacs.devel Subject: Re: shell-quote-argument: make it behave as if on Unix? Date: Fri, 12 Apr 2002 13:16:11 +0300 Sender: emacs-devel-admin@gnu.org Message-ID: <5567-Fri12Apr2002131610+0300-eliz@is.elta.co.il> References: <2950-Wed10Apr2002195652+0300-eliz@is.elta.co.il> <200204120311.g3C3Bjg22167@aztec.santafe.edu> <200204120409.g3C49h707814@rum.cs.yale.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1018606898 9713 127.0.0.1 (12 Apr 2002 10:21:38 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 12 Apr 2002 10:21:38 +0000 (UTC) Cc: rms@gnu.org, Kai.Grossjohann@CS.Uni-Dortmund.DE, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16vyBW-0002WY-00 for ; Fri, 12 Apr 2002 12:21:38 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 16vyRj-00043X-00 for ; Fri, 12 Apr 2002 12:38:23 +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 16vyB1-0006kY-00; Fri, 12 Apr 2002 06:21:07 -0400 Original-Received: from odin.inter.net.il ([192.114.186.10]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16vyAq-0006jV-00; Fri, 12 Apr 2002 06:20:57 -0400 Original-Received: from zaretsky (diup-217-177.inter.net.il [213.8.217.177]) by odin.inter.net.il (Mirapoint Messaging Server MOS 2.9.3.2) with ESMTP id AAZ58290; Fri, 12 Apr 2002 13:20:50 +0300 (IDT) Original-To: monnier+gnu/emacs@rum.cs.yale.edu X-Mailer: emacs 21.2.50 (via feedmail 8 I) and Blat ver 1.8.9 In-Reply-To: <200204120409.g3C49h707814@rum.cs.yale.edu> (monnier+gnu/emacs@rum.cs.yale.edu) 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:2573 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:2573 > 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.