auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. a833afff74bb3534a5bce


From: Arash Esbati
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. a833afff74bb3534a5bce265e2478296f8152526
Date: Sat, 17 Dec 2016 08:08:15 +0000 (UTC)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
       via  a833afff74bb3534a5bce265e2478296f8152526 (commit)
       via  026579322e0d3327717841f50c1f8814e2909af1 (commit)
       via  945035c9c12a9930cb84491f3b6e0d30e1672798 (commit)
      from  1aa46c3e193ac4c9d23586b59e2256841d02c413 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a833afff74bb3534a5bce265e2478296f8152526
Author: Arash Esbati <address@hidden>
Date:   Sat Dec 17 09:06:09 2016 +0100

    Use `LaTeX-item-longtable' while inserting longtable's
    
    * style/longtable.el (LaTeX-longtable-skipping-regexp): New variable.
    (LaTeX-item-longtable): New function.  This function is a
    variation of `LaTeX-item-array' which uses
    `LaTeX-longtable-skipping-regexp' when inserting ampersands.
    ("longtable"): Append longtable to `LaTeX-item-list'.

diff --git a/style/longtable.el b/style/longtable.el
index 76c397b..aeb275e 100644
--- a/style/longtable.el
+++ b/style/longtable.el
@@ -29,6 +29,23 @@
 
 ;;; Code:
 
+(defvar LaTeX-longtable-skipping-regexp
+  (regexp-opt '("[l]" "[r]" "[c]" ""))
+  "Regexp matching between \\begin{longtable} and column specification.
+For longtable environments only.")
+
+(defun LaTeX-item-longtable (&optional suppress)
+  "Insert line break macro on the last line and suitable number of &'s.
+For longtable environments.  If SUPPRESS is non-nil, do not
+insert line break macro."
+  (unless suppress
+    (save-excursion
+      (end-of-line 0)
+      (just-one-space)
+      (TeX-insert-macro "\\")))
+  (LaTeX-insert-ampersands
+   LaTeX-longtable-skipping-regexp #'LaTeX-array-count-columns))
+
 (TeX-add-style-hook
  "longtable"
  (lambda ()
@@ -64,7 +81,9 @@
                        (LaTeX-fill-paragraph)
                        ;; Insert a new line and indent
                        (LaTeX-newline)
-                       (indent-according-to-mode))))))
+                       (indent-according-to-mode))
+                     ;; Insert suitable number of &'s, suppress line break
+                     (LaTeX-item-longtable t)))))
 
    (TeX-add-symbols
     ;; Commands to end table rows
@@ -91,6 +110,9 @@
    ;; custome values.
    (add-to-list 'LaTeX-label-alist '("longtable" . LaTeX-table-label) t)
 
+   ;; Append longtable to `LaTeX-item-list' with `LaTeX-item-longtable'
+   (add-to-list 'LaTeX-item-list '("longtable" . LaTeX-item-longtable) t)
+
    ;; Fontification
    (when (and (featurep 'font-latex)
              (eq TeX-install-font-lock 'font-latex-setup))

commit 026579322e0d3327717841f50c1f8814e2909af1
Author: Arash Esbati <address@hidden>
Date:   Sat Dec 17 08:59:01 2016 +0100

    Add "s" and "S" to `LaTeX-array-column-letters'
    
    * style/siunitx.el ("siunitx"): Add column specification letters
    "s" and "S" to `LaTeX-array-column-letters'.

diff --git a/style/siunitx.el b/style/siunitx.el
index a5890f5..9fad553 100644
--- a/style/siunitx.el
+++ b/style/siunitx.el
@@ -590,11 +590,17 @@ string."
       "ab"
       "zb"
       "yb"))
+
+   ;; `siunitx.sty' adds new column specification letters
+   (set (make-local-variable 'LaTeX-array-column-letters)
+       (concat LaTeX-array-column-letters "s" "S"))
+
    (TeX-run-style-hooks "l3keys2e"
                        "array"
                        "amstext"
                        "xparse"
                        "expl3")
+
    ;; Fontification
    (when (and (featurep 'font-latex)
              (eq TeX-install-font-lock 'font-latex-setup))

commit 945035c9c12a9930cb84491f3b6e0d30e1672798
Author: Arash Esbati <address@hidden>
Date:   Sat Dec 17 08:46:27 2016 +0100

    Append tabular[xy] to `LaTeX-item-list'
    
    * style/tabulary.el ("tabulary"):
    * style/tabularx.el ("tabularx"): Append tabularx and tabulary to
    `LaTeX-item-list'.

diff --git a/style/tabularx.el b/style/tabularx.el
index 63a1272..2d484db 100644
--- a/style/tabularx.el
+++ b/style/tabularx.el
@@ -43,6 +43,10 @@
    ;; `LaTeX-indent-environment-list' in order not to override custom settings.
    (add-to-list (make-local-variable 'LaTeX-indent-environment-list)
                '("tabularx" LaTeX-indent-tabular) t)
+
+   ;; Append tabularx to `LaTeX-item-list' with `LaTeX-item-tabular*'
+   (add-to-list 'LaTeX-item-list '("tabularx" . LaTeX-item-tabular*) t)
+
    ;; New symbols
    (TeX-add-symbols
     "tracingtabularx"
diff --git a/style/tabulary.el b/style/tabulary.el
index 289401e..aa0fcf5 100644
--- a/style/tabulary.el
+++ b/style/tabulary.el
@@ -43,6 +43,10 @@
    ;; `LaTeX-indent-environment-list' in order not to override custom settings.
    (add-to-list (make-local-variable 'LaTeX-indent-environment-list)
                '("tabulary" LaTeX-indent-tabular))
+
+   ;; Append tabulary to `LaTeX-item-list' with `LaTeX-item-tabular*'
+   (add-to-list 'LaTeX-item-list '("tabulary" . LaTeX-item-tabular*) t)
+
    ;; New symbols
    (TeX-add-symbols
     "tymax" "tymin" "tyformat")

-----------------------------------------------------------------------

Summary of changes:
 style/longtable.el |   24 +++++++++++++++++++++++-
 style/siunitx.el   |    6 ++++++
 style/tabularx.el  |    4 ++++
 style/tabulary.el  |    4 ++++
 4 files changed, 37 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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