From 013111d11dc4d09cfab1ba4fbfb0b36fb0c5e24c Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Mon, 8 May 2017 15:27:40 +0530 Subject: [PATCH] Emacs: Comment on usefulness of 'escape-region' --- .emacs.d/lisp/functions.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.emacs.d/lisp/functions.el b/.emacs.d/lisp/functions.el index 501468ad..cd3c53c1 100644 --- a/.emacs.d/lisp/functions.el +++ b/.emacs.d/lisp/functions.el @@ -68,8 +68,9 @@ Also returns nil if pid is nil." (defun escape-region (&optional regex to-string) "Escape double-quotes and backslashes. -You can control the regex replacement with the two optional -parameters." +This is useful for writing Elisp strings containing those +characters. You can control the regex replacement with the two +optional parameters." (interactive) (unless regex (setq regex "\\([\"\\\\]\\)")) (unless to-string (setq to-string "\\\\\\1"))