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 | 7c82f3e23e37cc848a38b1f8be7149fd672a6393 (patch) | |
| tree | e721d1d5361deeb04278045331d74e9c7f8b00f0 /lisp/subr.el | |
| parent | 80094035aff85d827e1ef65627974b34ad9fa8df (diff) | |
| parent | bd2a4b24c4a591240862704737b5bc696ff67cbf (diff) | |
| download | emacs-7c82f3e23e37cc848a38b1f8be7149fd672a6393.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. |
