aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1998-03-16 01:35:04 +0000
committerRichard M. Stallman1998-03-16 01:35:04 +0000
commit9a79e9aebec5d0973be33ccd4232b40606915e51 (patch)
tree749c3df469fadbf6ac50affd3f439bb9d4d4e398
parente0c0ed58af65d4e36ffceeb54bfb534c01c6843a (diff)
downloademacs-9a79e9aebec5d0973be33ccd4232b40606915e51.tar.gz
emacs-9a79e9aebec5d0973be33ccd4232b40606915e51.zip
(dired-shell-stuff-it): Use shell-quote-argument.
(dired-shell-quote): Function deleted.
-rw-r--r--lisp/dired-aux.el16
1 files changed, 2 insertions, 14 deletions
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 303eed96aed..6d0c3395777 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -292,18 +292,6 @@ with a prefix argument."
292 (insert dired-del-marker))))) 292 (insert dired-del-marker)))))
293 293
294;;; Shell commands 294;;; Shell commands
295;;>>> install (move this function into simple.el)
296(defun dired-shell-quote (filename)
297 "Quote a file name for inferior shell (see variable `shell-file-name')."
298 ;; Quote everything except POSIX filename characters.
299 ;; This should be safe enough even for really weird shells.
300 (let ((result "") (start 0) end)
301 (while (string-match "[^-0-9a-zA-Z_./]" filename start)
302 (setq end (match-beginning 0)
303 result (concat result (substring filename start end)
304 "\\" (substring filename end (1+ end)))
305 start (1+ end)))
306 (concat result (substring filename start))))
307 295
308(defun dired-read-shell-command (prompt arg files) 296(defun dired-read-shell-command (prompt arg files)
309;; "Read a dired shell command prompting with PROMPT (using read-string). 297;; "Read a dired shell command prompting with PROMPT (using read-string).
@@ -387,8 +375,8 @@ output files usually are created there instead of in a subdir."
387 (dired-replace-in-string "\\*" x command))) 375 (dired-replace-in-string "\\*" x command)))
388 (function (lambda (x) (concat command " " x)))))) 376 (function (lambda (x) (concat command " " x))))))
389 (if on-each 377 (if on-each
390 (mapconcat stuff-it (mapcar 'dired-shell-quote file-list) ";") 378 (mapconcat stuff-it (mapcar 'shell-quote-argument file-list) ";")
391 (let ((fns (mapconcat 'dired-shell-quote 379 (let ((fns (mapconcat 'shell-quote-argument
392 file-list dired-mark-separator))) 380 file-list dired-mark-separator)))
393 (if (> (length file-list) 1) 381 (if (> (length file-list) 1)
394 (setq fns (concat dired-mark-prefix fns dired-mark-postfix))) 382 (setq fns (concat dired-mark-prefix fns dired-mark-postfix)))