emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/auctex ddb0f08ff1 10/24: Add default entries to LaTeX-i


From: Tassilo Horn
Subject: [elpa] externals/auctex ddb0f08ff1 10/24: Add default entries to LaTeX-indent-environment-list (bug#28405)
Date: Mon, 21 Feb 2022 02:38:46 -0500 (EST)

branch: externals/auctex
commit ddb0f08ff1adb8a89f2d808dd6109ed535e552b3
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Commit: Ikumi Keita <ikumi@ikumi.que.jp>

    Add default entries to LaTeX-indent-environment-list (bug#28405)
    
    My previous commits disregard user's customization on
    LaTeX-indent-environment-list. Reconsideration led to move entries to
    its default value.
    
    * style/amsmath.el ("amsmath"):
    * style/mathtools.el ("mathtools"):
    Move entries into default value in latex.el.
    * latex.el (LaTeX-indent-environment-list): Pull in those entries.
    Add math envs without alignment as well to fix bug#28405.
---
 latex.el           | 49 ++++++++++++++++++++++++++++++++++++++++++++++++-
 style/amsmath.el   | 24 ------------------------
 style/mathtools.el | 25 -------------------------
 3 files changed, 48 insertions(+), 50 deletions(-)

diff --git a/latex.el b/latex.el
index e361c214ff..97eb5b16e4 100644
--- a/latex.el
+++ b/latex.el
@@ -3545,12 +3545,59 @@ consideration just as is in the non-commented source 
code."
     ("array" LaTeX-indent-tabular)
     ("eqnarray" LaTeX-indent-tabular)
     ("eqnarray*" LaTeX-indent-tabular)
+    ;; envs of amsmath.sty
+    ("align"       LaTeX-indent-tabular)
+    ("align*"      LaTeX-indent-tabular)
+    ("aligned"     LaTeX-indent-tabular)
+    ("alignat"     LaTeX-indent-tabular)
+    ("alignat*"    LaTeX-indent-tabular)
+    ("alignedat"   LaTeX-indent-tabular)
+    ("xalignat"    LaTeX-indent-tabular)
+    ("xalignat*"   LaTeX-indent-tabular)
+    ("xxalignat"   LaTeX-indent-tabular)
+    ("flalign"     LaTeX-indent-tabular)
+    ("flalign*"    LaTeX-indent-tabular)
+    ("split"       LaTeX-indent-tabular)
+    ("matrix"      LaTeX-indent-tabular)
+    ("pmatrix"     LaTeX-indent-tabular)
+    ("bmatrix"     LaTeX-indent-tabular)
+    ("Bmatrix"     LaTeX-indent-tabular)
+    ("vmatrix"     LaTeX-indent-tabular)
+    ("Vmatrix"     LaTeX-indent-tabular)
+    ("smallmatrix" LaTeX-indent-tabular)
+    ("cases"       LaTeX-indent-tabular)
+    ;; envs of mathtools.sty
+    ("matrix*"       LaTeX-indent-tabular)
+    ("pmatrix*"      LaTeX-indent-tabular)
+    ("bmatrix*"      LaTeX-indent-tabular)
+    ("Bmatrix*"      LaTeX-indent-tabular)
+    ("vmatrix*"      LaTeX-indent-tabular)
+    ("Vmatrix*"      LaTeX-indent-tabular)
+    ("smallmatrix*"  LaTeX-indent-tabular)
+    ("psmallmatrix"  LaTeX-indent-tabular)
+    ("psmallmatrix*" LaTeX-indent-tabular)
+    ("bsmallmatrix"  LaTeX-indent-tabular)
+    ("bsmallmatrix*" LaTeX-indent-tabular)
+    ("vsmallmatrix"  LaTeX-indent-tabular)
+    ("vsmallmatrix*" LaTeX-indent-tabular)
+    ("Vsmallmatrix"  LaTeX-indent-tabular)
+    ("Vsmallmatrix*" LaTeX-indent-tabular)
+    ("dcases"        LaTeX-indent-tabular)
+    ("dcases*"       LaTeX-indent-tabular)
+    ("rcases"        LaTeX-indent-tabular)
+    ("rcases*"       LaTeX-indent-tabular)
+    ("drcases"       LaTeX-indent-tabular)
+    ("drcases*"      LaTeX-indent-tabular)
+    ("cases*"        LaTeX-indent-tabular)
     ;; The following should have their own, smart indentation function.
     ;; Some other day.
     ("displaymath")
     ("equation")
     ("picture")
-    ("tabbing"))
+    ("tabbing")
+    ;; envs from amsmath.sty
+    ("gather") ("gather*") ("gathered")
+    ("equation*") ("multline") ("multline*"))
   "Alist of environments with special indentation.
 The second element in each entry is the function to calculate the
 indentation level in columns.
diff --git a/style/amsmath.el b/style/amsmath.el
index e3cce752d7..5e7812e7b7 100644
--- a/style/amsmath.el
+++ b/style/amsmath.el
@@ -152,30 +152,6 @@
                    ("flalign"    . LaTeX-amsmath-label)
                    ("gather"     . LaTeX-amsmath-label))))
 
-   (setq-local LaTeX-indent-environment-list
-               (append LaTeX-indent-environment-list
-                       '(("equation*")
-                         ("align"       LaTeX-indent-tabular)
-                         ("align*"      LaTeX-indent-tabular)
-                         ("aligned"     LaTeX-indent-tabular)
-                         ("alignat"     LaTeX-indent-tabular)
-                         ("alignat*"    LaTeX-indent-tabular)
-                         ("alignedat"   LaTeX-indent-tabular)
-                         ("xalignat"    LaTeX-indent-tabular)
-                         ("xalignat*"   LaTeX-indent-tabular)
-                         ("xxalignat"   LaTeX-indent-tabular)
-                         ("flalign"     LaTeX-indent-tabular)
-                         ("flalign*"    LaTeX-indent-tabular)
-                         ("split"       LaTeX-indent-tabular)
-                         ("matrix"      LaTeX-indent-tabular)
-                         ("pmatrix"     LaTeX-indent-tabular)
-                         ("bmatrix"     LaTeX-indent-tabular)
-                         ("Bmatrix"     LaTeX-indent-tabular)
-                         ("vmatrix"     LaTeX-indent-tabular)
-                         ("Vmatrix"     LaTeX-indent-tabular)
-                         ("smallmatrix" LaTeX-indent-tabular)
-                         ("cases"       LaTeX-indent-tabular))))
-
    (set (make-local-variable 'TeX-braces-association)
         (append '(("\\lvert" . "\\rvert")
                   ("\\lVert" . "\\rVert"))
diff --git a/style/mathtools.el b/style/mathtools.el
index 4643df7e9a..d0e1f262c4 100644
--- a/style/mathtools.el
+++ b/style/mathtools.el
@@ -472,31 +472,6 @@ Put line break macro on the last line.  Next, insert an 
ampersand."
                    ("multlined" . LaTeX-amsmath-label))
                  LaTeX-label-alist))
 
-   (setq-local LaTeX-indent-environment-list
-               (append LaTeX-indent-environment-list
-                       '(("matrix*"       LaTeX-indent-tabular)
-                         ("pmatrix*"      LaTeX-indent-tabular)
-                         ("bmatrix*"      LaTeX-indent-tabular)
-                         ("Bmatrix*"      LaTeX-indent-tabular)
-                         ("vmatrix*"      LaTeX-indent-tabular)
-                         ("Vmatrix*"      LaTeX-indent-tabular)
-                         ("smallmatrix*"  LaTeX-indent-tabular)
-                         ("psmallmatrix"  LaTeX-indent-tabular)
-                         ("psmallmatrix*" LaTeX-indent-tabular)
-                         ("bsmallmatrix"  LaTeX-indent-tabular)
-                         ("bsmallmatrix*" LaTeX-indent-tabular)
-                         ("vsmallmatrix"  LaTeX-indent-tabular)
-                         ("vsmallmatrix*" LaTeX-indent-tabular)
-                         ("Vsmallmatrix"  LaTeX-indent-tabular)
-                         ("Vsmallmatrix*" LaTeX-indent-tabular)
-                         ("dcases"        LaTeX-indent-tabular)
-                         ("dcases*"       LaTeX-indent-tabular)
-                         ("rcases"        LaTeX-indent-tabular)
-                         ("rcases*"       LaTeX-indent-tabular)
-                         ("drcases"       LaTeX-indent-tabular)
-                         ("drcases*"      LaTeX-indent-tabular)
-                         ("cases*"        LaTeX-indent-tabular))))
-
    ;; RefTeX support: Add env's with `reftex-add-label-environments'
    (when (fboundp 'reftex-add-label-environments)
      (let ((envs '(("lgathered"  ?e nil nil t)



reply via email to

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