comparison lisp/efs/dired-shell.el @ 185:3d6bfa290dbd r20-3b19

Import from CVS: tag r20-3b19
author cvs
date Mon, 13 Aug 2007 09:55:28 +0200
parents 6608ceec7cf8
children
comparison
equal deleted inserted replaced
184:bcd2674570bf 185:3d6bfa290dbd
183 ;;; Utility functions and Macros 183 ;;; Utility functions and Macros
184 184
185 (defun dired-shell-quote (filename) 185 (defun dired-shell-quote (filename)
186 ;; Quote a file name for inferior shell (see variable shell-file-name). 186 ;; Quote a file name for inferior shell (see variable shell-file-name).
187 ;; Quote everything except POSIX filename characters. 187 ;; Quote everything except POSIX filename characters.
188 ;; This should be safe enough even for really wierd shells. 188 ;; This should be safe enough even for really weird shells.
189 (let ((result "") (start 0) end) 189 (let ((result "") (start 0) end)
190 (while (string-match "[^---0-9a-zA-Z_./]" filename start) 190 (while (string-match "[^---0-9a-zA-Z_./]" filename start)
191 (setq end (match-beginning 0) 191 (setq end (match-beginning 0)
192 result (concat result (substring filename start end) 192 result (concat result (substring filename start end)
193 "\\" (substring filename end (1+ end))) 193 "\\" (substring filename end (1+ end)))