changeset 59845:17819269525e

(reftex-access-scan-info): Error out in a buffer not visiting a file.
author Carsten Dominik <dominik@science.uva.nl>
date Tue, 01 Feb 2005 12:39:39 +0000
parents ad4e57b1cefd
children e760650016fc
files lisp/textmodes/reftex.el
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/reftex.el	Tue Feb 01 12:37:28 2005 +0000
+++ b/lisp/textmodes/reftex.el	Tue Feb 01 12:39:39 2005 +0000
@@ -1228,6 +1228,11 @@
   ;; But, when RESCAN is -1, don't rescan even if docstruct is empty.
   ;; When FILE is non-nil, parse only from that file.
 
+  ;; Error out in a buffer without a file.
+  (if (and reftex-mode
+	   (not (buffer-file-name)))
+      (error "RefTeX works only in buffers visiting a file."))
+
   ;; Make sure we have the symbols tied
   (if (eq reftex-docstruct-symbol nil)
       ;; Symbols are not yet tied: Tie them.