auctex-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-diffs] [elpa] externals/auctex 42dd1f1 22/36: Support RefTeX wit


From: Tassilo Horn
Subject: [AUCTeX-diffs] [elpa] externals/auctex 42dd1f1 22/36: Support RefTeX with `reftex-add-index-macros' in style/splitidx.el
Date: Thu, 22 Dec 2016 13:08:12 +0000 (UTC)

branch: externals/auctex
commit 42dd1f1bbd55361be0494e2f8456c2535aecb855
Author: Arash Esbati <address@hidden>
Commit: Arash Esbati <address@hidden>

    Support RefTeX with `reftex-add-index-macros' in style/splitidx.el
    
    * style/splitidx.el ("splitidx"): Support RefTeX with
    `reftex-add-index-macros' and not by appending macros to
    `reftex-index-macros'.
---
 style/splitidx.el |   16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/style/splitidx.el b/style/splitidx.el
index a2d9be7..554c7a3 100644
--- a/style/splitidx.el
+++ b/style/splitidx.el
@@ -230,12 +230,10 @@
    (add-to-list 'TeX-complete-list
                '("|see{\([^{}

]*\)" 1 LaTeX-index-entry-list))
 
-   ;; Append our defintion to `reftex-index-macros' in order not to
-   ;; override any user customizations.
-   (when (boundp 'reftex-index-macros)
-     (add-to-list 'reftex-index-macros
-                 `("\sindex[]{*}" 1
-                   ,LaTeX-splitidx-sindex-reftex-quick-id-key "" nil t)))
+   ;; Tell RefTeX with `reftex-add-index-macros'
+   (when (fboundp 'reftex-add-index-macros)
+     (reftex-add-index-macros
+      `(("\sindex[]{*}" 1 ,LaTeX-splitidx-sindex-reftex-quick-id-key "" nil 
t))))
 
    ;; 3.2 Marking up index entries
    ;; \index should be an alias for \sindex
@@ -247,10 +245,8 @@
                        (LaTeX-splitidx-newindex-list) ]
          (TeX-arg-index)))
        ;; Tell RefTeX to look in the optional arg. for the index short cut
-       (when (boundp 'reftex-index-macros)
-        (add-to-list 'reftex-index-macros
-                     '("\index[]{*}" 1 ?i "" nil t)
-                     t))
+       (when (fboundp 'reftex-add-index-macros)
+        (reftex-add-index-macros '(("\index[]{*}" 1 ?i "" nil t))))
        (add-to-list 'LaTeX-auto-regexp-list
                    `(,(concat
                        "\\index\(?:\[[^{}]*\]\)?"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]