summaryrefslogtreecommitdiff
path: root/lisp/textmodes/reftex-toc.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/textmodes/reftex-toc.el')
-rw-r--r--lisp/textmodes/reftex-toc.el3
1 files changed, 1 insertions, 2 deletions
diff --git a/lisp/textmodes/reftex-toc.el b/lisp/textmodes/reftex-toc.el
index 1066066462d..ae1690416b9 100644
--- a/lisp/textmodes/reftex-toc.el
+++ b/lisp/textmodes/reftex-toc.el
@@ -665,9 +665,8 @@ promotion/demotion later."
(if (and (markerp marker) (marker-buffer marker))
;; Buffer is still live and we have the marker.
(progn
- (save-excursion
+ (with-current-buffer (marker-buffer marker)
;; Goto the buffer and check of section is unchanged
- (set-buffer (marker-buffer marker))
(goto-char (marker-position marker))
(if (looking-at (regexp-quote literal))
;; OK, get the makro name