summaryrefslogtreecommitdiff
path: root/lisp/replace.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-12-13 22:13:40 +0000
committerRichard M. Stallman <rms@gnu.org>1994-12-13 22:13:40 +0000
commitf5426232d0eaaf3794e929fec29d77a8a3e7fa35 (patch)
tree401e2bd457848f87feb07814569055f1af9883e8 /lisp/replace.el
parentb6271ceee1d089dea84243a971ec8940b86cb459 (diff)
downloademacs-f5426232d0eaaf3794e929fec29d77a8a3e7fa35.tar.gz
(occur): Escape newlines when printing regexp.
Diffstat (limited to 'lisp/replace.el')
-rw-r--r--lisp/replace.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/replace.el b/lisp/replace.el
index 40b6c01bd04..322aa515abb 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -360,7 +360,8 @@ It serves as a menu to find any of the occurrences in this buffer.
(set-buffer standard-output)
;; We will insert the number of lines, and "lines", later.
(insert " matching ")
- (prin1 regexp)
+ (let ((print-escape-newlines t))
+ (prin1 regexp))
(insert " in buffer " (buffer-name buffer) ?. ?\n)
(occur-mode)
(setq occur-buffer buffer)