branch: externals/auctex
commit 17277d82fad928ec2b4e69be95266d2edb76169d
Author: Ikumi Keita <[email protected]>
Commit: Ikumi Keita <[email protected]>
Fix marker management
* latex.el (LaTeX-env-figure): Set marker only when it's really a
marker.
---
latex.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/latex.el b/latex.el
index 96e55df..6d25559 100644
--- a/latex.el
+++ b/latex.el
@@ -1247,7 +1247,8 @@ If SHORT-CAPTION is non-nil pass it as an optional
argument to
;; Insert an empty line between caption and marked region, if any.
(when active-mark (LaTeX-newline) (forward-line -1))
(indent-according-to-mode)))
- (set-marker end-marker nil)
+ (when (markerp end-marker)
+ (set-marker end-marker nil))
(when (and (member environment '("table" "table*"))
;; Suppose an existing tabular environment should just
;; be wrapped into a table if there is an active region.