aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/textmodes/reftex.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el
index 318279b1377..49485c24725 100644
--- a/lisp/textmodes/reftex.el
+++ b/lisp/textmodes/reftex.el
@@ -1228,6 +1228,11 @@ This enforces rescanning the buffer on next use."
1228 ;; But, when RESCAN is -1, don't rescan even if docstruct is empty. 1228 ;; But, when RESCAN is -1, don't rescan even if docstruct is empty.
1229 ;; When FILE is non-nil, parse only from that file. 1229 ;; When FILE is non-nil, parse only from that file.
1230 1230
1231 ;; Error out in a buffer without a file.
1232 (if (and reftex-mode
1233 (not (buffer-file-name)))
1234 (error "RefTeX works only in buffers visiting a file."))
1235
1231 ;; Make sure we have the symbols tied 1236 ;; Make sure we have the symbols tied
1232 (if (eq reftex-docstruct-symbol nil) 1237 (if (eq reftex-docstruct-symbol nil)
1233 ;; Symbols are not yet tied: Tie them. 1238 ;; Symbols are not yet tied: Tie them.