From 6eca2e74f906392828563f900d1393534d189af8 Mon Sep 17 00:00:00 2001
From: Tassilo Horn <tsdh@gnu.org>
Date: Tue, 23 Apr 2013 19:07:49 +0200
Subject: [PATCH] Fix recursive load issue with reftex.el and reftex-vars.el.

---
 lisp/ChangeLog                | 3 ---
 lisp/textmodes/reftex-vars.el | 3 ++-
 lisp/textmodes/reftex.el      | 1 -
 3 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 59e2a227e42..d299aeead49 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,8 +1,5 @@
 2013-04-23  Tassilo Horn  <tsdh@gnu.org>
 
-	* textmodes/reftex.el (reftex-compile-variables): Add autoload
-	cookie.
-
 	* textmodes/reftex-vars.el (reftex-label-regexps): Call
 	`reftex-compile-variables' after changes to this variable.
 
diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el
index a220002286e..7343d86b06f 100644
--- a/lisp/textmodes/reftex-vars.el
+++ b/lisp/textmodes/reftex-vars.el
@@ -880,7 +880,8 @@ When changed from Lisp, make sure to call
 effective."
   :set (lambda (symbol value)
 	 (set symbol value)
-	 (reftex-compile-variables))
+	 (when (fboundp 'reftex-compile-variables)
+	   (reftex-compile-variables)))
   :group 'reftex-defining-label-environments
   :type '(repeat (regexp :tag "Regular Expression")))
 
diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el
index 8b5dee5a037..21083fd188a 100644
--- a/lisp/textmodes/reftex.el
+++ b/lisp/textmodes/reftex.el
@@ -811,7 +811,6 @@ This enforces rescanning the buffer on next use."
      (reftex-kill-buffer (reftex-make-index-buffer-name tag)))
    (cdr (assoc 'index-tags (symbol-value reftex-docstruct-symbol)))))
 
-;;;###autoload
 (defun reftex-compile-variables ()
   ;; Compile the information in reftex-label-alist & Co.