unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Should shell-quote-argument really use (eq system-type  'windows-nt)?
@ 2005-03-07 12:59 Stephan Stahl
  2005-03-07 13:53 ` Lennart Borgman
  0 siblings, 1 reply; 4+ messages in thread
From: Stephan Stahl @ 2005-03-07 12:59 UTC (permalink / raw)


Hi.

I think shell-quote-argument should not use
(eq system-type'windows-nt)
instead it should take shell-file-name into account.

It seems very usual for emacs users on w32 to use cygwin or mingw.
Right now shell-quote-argument would return something wrong when bash
or some "intelligent" shell is used on w32 because it assumes a dumb
w32 shell.

What do others think about this (little tested) change?

diff -c "subr.el.~1.433~" "subr.el"
*** subr.el.~1.433~ Mon Mar  7 13:47:21 2005
--- subr.el Mon Mar  7 13:48:36 2005
***************
*** 2274,2280 ****
  				   "\\" (substring argument end (1+ end)))
  		    start (1+ end))))
  	(concat "\"" result (substring argument start) "\""))
!     (if (eq system-type 'windows-nt)
  	(concat "\"" argument "\"")
        (if (equal argument "")
  	  "''"
--- 2274,2280 ----
  				   "\\" (substring argument end (1+ end)))
  		    start (1+ end))))
  	(concat "\"" result (substring argument start) "\""))
!     (if (string-match shell-dumb-shell-regexp shell-file-name)
  	(concat "\"" argument "\"")
        (if (equal argument "")
  	  "''"

Stephan
-- 
Stephan Stahl

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-03-12 19:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-07 12:59 Should shell-quote-argument really use (eq system-type 'windows-nt)? Stephan Stahl
2005-03-07 13:53 ` Lennart Borgman
2005-03-07 14:20   ` David Kastrup
2005-03-12 19:37     ` Should shell-quote-argument really use (eq system-type'windows-nt)? Stephan Stahl

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).