changeset 12465:0d404ef125ea

(shell-quote-argument): Don't do anything, on MS-DOS.
author Richard M. Stallman <rms@gnu.org>
date Sat, 01 Jul 1995 21:48:13 +0000
parents 96d3d0dcc315
children b22565172b9b
files lisp/subr.el
diffstat 1 files changed, 14 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/subr.el	Sat Jul 01 20:03:39 1995 +0000
+++ b/lisp/subr.el	Sat Jul 01 21:48:13 1995 +0000
@@ -864,17 +864,20 @@
 
 (defun shell-quote-argument (argument)
   "Quote an argument for passing as argument to an inferior shell."
-  ;; Quote everything except POSIX filename characters.
-  ;; This should be safe enough even for really weird shells.
-  (if (eq system-type 'windows-nt)
-      (concat "\"" argument "\"")
-    (let ((result "") (start 0) end)
-      (while (string-match "[^-0-9a-zA-Z_./]" argument start)
-	(setq end (match-beginning 0)
-	      result (concat result (substring argument start end)
-			     "\\" (substring argument end (1+ end)))
-	      start (1+ end)))
-      (concat result (substring argument start)))))
+  (if (eq system-type 'ms-dos)
+      ;; MS-DOS shells don't have quoting, so don't do any.
+      argument
+    (if (eq system-type 'windows-nt)
+	(concat "\"" argument "\"")
+      ;; Quote everything except POSIX filename characters.
+      ;; This should be safe enough even for really weird shells.
+      (let ((result "") (start 0) end)
+	(while (string-match "[^-0-9a-zA-Z_./]" argument start)
+	  (setq end (match-beginning 0)
+		result (concat result (substring argument start end)
+			       "\\" (substring argument end (1+ end)))
+		start (1+ end)))
+	(concat result (substring argument start))))))
 
 (defun make-syntax-table (&optional oldtable)
   "Return a new syntax table.