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

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

[elpa] 183/299: Use enhanced tabular indentation for more envs.


From: Stefan Monnier
Subject: [elpa] 183/299: Use enhanced tabular indentation for more envs.
Date: Sun, 02 Nov 2014 03:11:18 +0000

monnier pushed a commit to branch externals/auctex
in repository elpa.

commit 1100cd8c1d79c9a6573caaf37269e0762089baf3
Author: Tassilo Horn <address@hidden>
Date:   Mon Oct 14 11:42:31 2013 +0200

    Use enhanced tabular indentation for more envs.
    
    * style/longtable.el ("longtable"): Use `LaTeX-indent-tabular'
    also for longtable environment.
    
    * style/tabularx.el ("tabularx"): Use `LaTeX-indent-tabular' also
    for tabularx environment.
    
    * style/tabulary.el ("tabulary"): Use `LaTeX-indent-tabular' also
    for tabulary environment.
    
    * latex.el (LaTeX-indent-environment-list): Use
    `LaTeX-indent-tabular' also for array and eqnarray environments.
---
 ChangeLog          |   14 ++++++++++++++
 latex.el           |   18 +++++++++---------
 style/longtable.el |    4 ++++
 style/tabularx.el  |    3 +++
 style/tabulary.el  |    3 +++
 5 files changed, 33 insertions(+), 9 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b8ff631..b3792a5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2013-10-14  Tassilo Horn  <address@hidden>
+
+       * style/longtable.el ("longtable"): Use `LaTeX-indent-tabular'
+       also for longtable environment.
+
+       * style/tabularx.el ("tabularx"): Use `LaTeX-indent-tabular' also
+       for tabularx environment.
+
+       * style/tabulary.el ("tabulary"): Use `LaTeX-indent-tabular' also
+       for tabulary environment.
+
+       * latex.el (LaTeX-indent-environment-list): Use
+       `LaTeX-indent-tabular' also for array and eqnarray environments.
+
 2013-10-14  Oleh Krehel  <address@hidden>
 
        * latex.el: `LaTeX-indent-tabular' now indents tabular-like
diff --git a/latex.el b/latex.el
index 8488966..2d28859 100644
--- a/latex.el
+++ b/latex.el
@@ -2621,22 +2621,22 @@ consideration just as is in the non-commented source 
code."
 (defcustom LaTeX-indent-environment-list
   '(("verbatim" current-indentation)
     ("verbatim*" current-indentation)
-    ;; The following should have there own, smart indentation function.
+    ("tabular" LaTeX-indent-tabular)
+    ("tabular*" LaTeX-indent-tabular)
+    ("align" LaTeX-indent-tabular)
+    ("align*" LaTeX-indent-tabular)
+    ("array" LaTeX-indent-tabular)
+    ("eqnarray" LaTeX-indent-tabular)
+    ("eqnarray*" LaTeX-indent-tabular)
+    ;; The following should have their own, smart indentation function.
     ;; Some other day.
-    ("array")
     ("displaymath")
-    ("eqnarray")
-    ("eqnarray*")
     ("equation")
     ("equation*")
     ("picture")
     ("tabbing")
     ("table")
-    ("table*")
-    ("tabular" LaTeX-indent-tabular)
-    ("tabular*" LaTeX-indent-tabular)
-    ("align" LaTeX-indent-tabular)
-    ("align*" LaTeX-indent-tabular))
+    ("table*"))
     "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/longtable.el b/style/longtable.el
index 8b23368..28a5a97 100644
--- a/style/longtable.el
+++ b/style/longtable.el
@@ -76,6 +76,10 @@
     ;; Caption commands
     '("caption*" 1))
 
+   ;; Use the enhanced table formatting
+   (add-to-list 'LaTeX-indent-environment-list
+               '("longtable" LaTeX-indent-tabular))
+
    ;; Fontification
    (when (and (featurep 'font-latex)
              (eq TeX-install-font-lock 'font-latex-setup))
diff --git a/style/tabularx.el b/style/tabularx.el
index 6f1005d..e499b5a 100644
--- a/style/tabularx.el
+++ b/style/tabularx.el
@@ -39,6 +39,9 @@
  (lambda ()
    ;; Make tabularx the default tabular environment
    (setq LaTeX-default-tabular-environment "tabularx")
+   ;; Use the enhanced tabular indentation
+   (add-to-list 'LaTeX-indent-environment-list
+               '("tabularx" LaTeX-indent-tabular))
    ;; New symbols
    (TeX-add-symbols
     "tracingtabularx"
diff --git a/style/tabulary.el b/style/tabulary.el
index a951669..eb20d24 100644
--- a/style/tabulary.el
+++ b/style/tabulary.el
@@ -39,6 +39,9 @@
  (lambda ()
    ;; Make tabulary the default tabular environment
    (setq LaTeX-default-tabular-environment "tabulary")
+   ;; Use the enhanced tabular indentation
+   (add-to-list 'LaTeX-indent-environment-list
+               '("tabulary" LaTeX-indent-tabular))
    ;; New symbols
    (TeX-add-symbols
     "tymax" "tymin" "tyformat")



reply via email to

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