auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] [elpa] externals/auctex 40da84e 20/36: Support RefTeX wit


From: Tassilo Horn
Subject: [AUCTeX-diffs] [elpa] externals/auctex 40da84e 20/36: Support RefTeX with `reftex-add-label-environments' in style/empheq.el
Date: Thu, 22 Dec 2016 13:08:12 +0000 (UTC)

branch: externals/auctex
commit 40da84e6de74bff46445043c05802fe67d36c491
Author: Arash Esbati <address@hidden>
Commit: Arash Esbati <address@hidden>

    Support RefTeX with `reftex-add-label-environments' in style/empheq.el
    
    * style/empheq.el ("empheq"): Support RefTeX with
    `reftex-add-label-environments' and not by appending environments
    to `reftex-label-alist'.
---
 style/empheq.el |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/style/empheq.el b/style/empheq.el
index cbafdb1..2db9b93 100644
--- a/style/empheq.el
+++ b/style/empheq.el
@@ -288,9 +288,9 @@ number of ampersands if possible."
    ;; `LaTeX-empheq-item-equation' when `M-RET' is invoked
    (add-to-list 'LaTeX-item-list '("empheq" . LaTeX-empheq-item-equation) t)
 
-   ;; Reftex support: Append definition to `reftex-label-alist'
-   (when (boundp 'reftex-label-alist)
-     (add-to-list 'reftex-label-alist '("empheq" ?e nil nil t) t))
+   ;; Reftex support: Use `reftex-add-label-environments'
+   (when (fboundp 'reftex-add-label-environments)
+     (reftex-add-label-environments '(("empheq" ?e nil nil t))))
 
    (TeX-add-symbols
     '("empheqset" (TeX-arg-key-val LaTeX-empheq-key-val-options-local))
@@ -399,8 +399,8 @@ number of ampersands if possible."
        (dolist (env envs)
         (add-to-list 'LaTeX-label-alist `(,env . LaTeX-amsmath-label) t)))
 
-     ;; RefTeX support: Append original definitions to `reftex-label-alist'
-     (when (boundp 'reftex-label-alist)
+     ;; RefTeX support: Add original definitions with 
`reftex-add-label-environments'
+     (when (fboundp 'reftex-add-label-environments)
        (let ((envs '(("AmSalign"     ?e nil nil eqnarray-like)
                     ("AmSequation"  ?e nil nil t)
                     ("AmSgather"    ?e nil nil eqnarray-like)
@@ -408,7 +408,7 @@ number of ampersands if possible."
                     ("AmSflalign"   ?e nil nil eqnarray-like)
                     ("AmSalignat"   ?e nil nil alignat-like))))
         (dolist (env envs)
-          (add-to-list 'reftex-label-alist env t))))
+          (reftex-add-label-environments `(,env)))))
 
      ;; Append original definitions to `LaTeX-item-list'; functions
      ;; are provided by amsmath.el



reply via email to

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