summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/re-builder.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp/re-builder.el')
-rw-r--r--lisp/emacs-lisp/re-builder.el3
1 files changed, 1 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el
index 31f7d8da49e..4b64f7aa808 100644
--- a/lisp/emacs-lisp/re-builder.el
+++ b/lisp/emacs-lisp/re-builder.el
@@ -658,8 +658,7 @@ If SUBEXP is non-nil mark only the corresponding sub-expressions."
(matches 0)
(submatches 0)
firstmatch)
- (save-excursion
- (set-buffer reb-target-buffer)
+ (with-current-buffer reb-target-buffer
(reb-delete-overlays)
(goto-char (point-min))
(while (and (not (eobp))