Function: replace-quote
replace-quote is a byte-compiled function defined in replace.el.gz.
Signature
(replace-quote REPLACEMENT)
Documentation
Quote a replacement string.
This just doubles all backslashes in REPLACEMENT and
returns the resulting string. If REPLACEMENT is not
a string, it is first passed through prin1-to-string
with the noescape argument set.
match-data is preserved across the call.
Source Code
;; Defined in /usr/src/emacs/lisp/replace.el.gz
(defun replace-quote (replacement)
"Quote a replacement string.
This just doubles all backslashes in REPLACEMENT and
returns the resulting string. If REPLACEMENT is not
a string, it is first passed through `prin1-to-string'
with the `noescape' argument set.
`match-data' is preserved across the call."
(string-replace "\\" "\\\\"
(if (stringp replacement)
replacement
(prin1-to-string replacement t))))