diff options
author | Glenn Morris <rgm@gnu.org> | 2011-01-22 11:36:45 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2011-01-22 11:36:45 -0800 |
commit | 438ddeba5acd87ca213d9145d8c40dcc4fc7d8d3 (patch) | |
tree | ceff9968aced64488a64e03e0f2cebd8777af93c /lisp/subr.el | |
parent | 1e9270bb629b5e584d420b2a12d7835b2a8793dd (diff) | |
parent | 1c040cc05dc64d32d11bca9434dcf516810a2eb6 (diff) | |
download | emacs-438ddeba5acd87ca213d9145d8c40dcc4fc7d8d3.tar.gz |
Merge from emacs-23
Diffstat (limited to 'lisp/subr.el')
-rw-r--r-- | lisp/subr.el | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index d36e96e5f89..2a1619c0903 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2461,13 +2461,8 @@ Note: :data and :device are currently not supported on Windows." "''" ;; 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)))))) + (replace-regexp-in-string "\n" "'\n'" + (replace-regexp-in-string "[^-0-9a-zA-Z_./\n]" "\\\\\\&" argument))))) (defun string-or-null-p (object) "Return t if OBJECT is a string or nil. |