monnier pushed a commit to branch externals/auctex
in repository elpa.
commit a4f103a78b46654e6af1051ac2b34981c70f9576
Author: Vincent Belaïche <[email protected]>
Date: Tue Jan 7 09:58:14 2014 +0100
Fix a bug with reftex where tex-info and LaTeX interferred.
* tex-info.el (Texinfo-reftex-hook): Replace use of
reftex-tables-dirty by that of reftex-default-label-alist-entries
to trigger call to reftex-compile-variables in a standard way.
The problem was that generating a TOC for a Texinfo file and then
for a LaTeX file was not working for the LaTeX file because the
Texinfo file was using LaTeX label style and as such
reftex-ensure-compiled-variables was not calling
reftex-compile-variables, which caused wrong
reftex-everything-regexp for sections.
Signed-off-by: Tassilo Horn <[email protected]>
---
ChangeLog | 12 ++++++++++++
tex-info.el | 8 +++++++-
2 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f3573f0..4da30d5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2014-01-06 Vincent Bela�che <[email protected]>
+
+ * tex-info.el (Texinfo-reftex-hook): Replace use of
+ reftex-tables-dirty by that of reftex-default-label-alist-entries
+ to trigger call to reftex-compile-variables in a standard way.
+ The problem was that generating a TOC for a Texinfo file and then
+ for a LaTeX file was not working for the LaTeX file because the
+ Texinfo file was using LaTeX label style and as such
+ reftex-ensure-compiled-variables was not calling
+ reftex-compile-variables, which caused wrong
+ reftex-everything-regexp for sections.
+
2014-01-06 Mos� Giordano <[email protected]>
* latex.el (LaTeX-math-insert): Use `TeX-electric-math' for
diff --git a/tex-info.el b/tex-info.el
index c1df5ec..a42884d 100644
--- a/tex-info.el
+++ b/tex-info.el
@@ -392,10 +392,17 @@ for @node."
"Hook function to plug Texinfo into RefTeX."
;; force recompilation of variables
(when (string= TeX-base-mode-name "Texinfo")
+ ;; dirty temporary hook to remove when reftex has a Texinfo builtin
+ ;; TODO --- taken on <2014-01-06 mon> --- remove the dirty trick once
reftex
+ ;; has been corrected for long enough a time
+ (unless (assq 'Texinfo reftex-label-alist-builtin)
+ (setq reftex-label-alist-builtin (append reftex-label-alist-builtin
+ '((Texinfo "Texinfo default
environments" nil)))))
(dolist (v `((reftex-section-pre-regexp . "@")
; section post-regexp must contain exactly one group
(reftex-section-post-regexp . "\\([ \t]+\\)")
(reftex-section-info-function . Texinfo-reftex-section-info)
+ (reftex-default-label-alist-entries . (Texinfo))
(reftex-section-levels
. ,(mapcar
(lambda (x)
@@ -405,7 +412,6 @@ for @node."
(cons (car x) (cadr x))))
texinfo-section-list))))
(set (make-local-variable (car v) ) (cdr v)))
- (setq reftex-tables-dirty t)
(reftex-ensure-compiled-variables)))
;;; Keymap: