Emacs: Comment on usefulness of 'escape-region'
parent
644d13ff92
commit
013111d11d
|
@ -68,8 +68,9 @@ Also returns nil if pid is nil."
|
||||||
|
|
||||||
(defun escape-region (&optional regex to-string)
|
(defun escape-region (&optional regex to-string)
|
||||||
"Escape double-quotes and backslashes.
|
"Escape double-quotes and backslashes.
|
||||||
You can control the regex replacement with the two optional
|
This is useful for writing Elisp strings containing those
|
||||||
parameters."
|
characters. You can control the regex replacement with the two
|
||||||
|
optional parameters."
|
||||||
(interactive)
|
(interactive)
|
||||||
(unless regex (setq regex "\\([\"\\\\]\\)"))
|
(unless regex (setq regex "\\([\"\\\\]\\)"))
|
||||||
(unless to-string (setq to-string "\\\\\\1"))
|
(unless to-string (setq to-string "\\\\\\1"))
|
||||||
|
|
Loading…
Reference in New Issue