Mercurial > emacs
comparison lisp/files.el @ 102760:385e858f5ec1
(shell-quote-wildcard-pattern): Doc fix.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 28 Mar 2009 12:26:04 +0000 |
parents | 531ffc32a1a2 |
children | b7fa7db181be |
comparison
equal
deleted
inserted
replaced
102759:ec3ec7f5d54e | 102760:385e858f5ec1 |
---|---|
5252 | 5252 |
5253 (defun shell-quote-wildcard-pattern (pattern) | 5253 (defun shell-quote-wildcard-pattern (pattern) |
5254 "Quote characters special to the shell in PATTERN, leave wildcards alone. | 5254 "Quote characters special to the shell in PATTERN, leave wildcards alone. |
5255 | 5255 |
5256 PATTERN is assumed to represent a file-name wildcard suitable for the | 5256 PATTERN is assumed to represent a file-name wildcard suitable for the |
5257 underlying filesystem. For Unix and GNU/Linux, the characters from the | 5257 underlying filesystem. For Unix and GNU/Linux, each character from the |
5258 set [ \\t\\n;<>&|()'\"#$] are quoted with a backslash; for DOS/Windows, all | 5258 set [ \\t\\n;<>&|()'\"#$] is quoted with a backslash; for DOS/Windows, all |
5259 the parts of the pattern which don't include wildcard characters are | 5259 the parts of the pattern which don't include wildcard characters are |
5260 quoted with double quotes. | 5260 quoted with double quotes. |
5261 Existing quote characters in PATTERN are left alone, so you can pass | 5261 |
5262 PATTERN that already quotes some of the special characters." | 5262 This function leaves alone existing quote characters (\\ on Unix and \" |
5263 on Windows), so PATTERN can use them to quote wildcard characters that | |
5264 need to be passed verbatim to shell commands." | |
5263 (save-match-data | 5265 (save-match-data |
5264 (cond | 5266 (cond |
5265 ((memq system-type '(ms-dos windows-nt cygwin)) | 5267 ((memq system-type '(ms-dos windows-nt cygwin)) |
5266 ;; DOS/Windows don't allow `"' in file names. So if the | 5268 ;; DOS/Windows don't allow `"' in file names. So if the |
5267 ;; argument has quotes, we can safely assume it is already | 5269 ;; argument has quotes, we can safely assume it is already |