branch: main commit dfd4eab0adee904bcbb9241e13d1170e375cc844 Author: Arash Esbati <ar...@gnu.org> Commit: Arash Esbati <ar...@gnu.org>
Don't alter `LaTeX-indent-environment-list' from styles * style/longtable.el ("longtable"): * style/ltcaption.el ("ltcaption"): * style/stabular.el ("stabular"): * style/tabularx.el ("tabularx"): * style/tabulary.el ("tabulary"): * style/xltabular.el ("xltabular"): Move addition to `LaTeX-indent-environment-list' from style files ... * latex.el (LaTeX-indent-environment-list): .. to here. Also add environments from tabularray package. * NEWS.org (Changed): Announce the change. --- NEWS.org | 4 ++++ latex.el | 20 +++++++++++++++++++- style/longtable.el | 6 ------ style/ltcaption.el | 8 +------- style/stabular.el | 13 +------------ style/tabularx.el | 4 ---- style/tabulary.el | 7 ------- style/xltabular.el | 7 +------ 8 files changed, 26 insertions(+), 43 deletions(-) diff --git a/NEWS.org b/NEWS.org index c06c186a..2f258249 100644 --- a/NEWS.org +++ b/NEWS.org @@ -37,6 +37,10 @@ For users who tracked the master branch: Do =git switch main= to switch to the main branch where development takes place nowadays. +- Move additions to the variable ~LaTeX-indent-environment-list~ for + various tabular environments to =latex.el= from the respective style + files. + ** Removed - Remove the possibility to disable the side-wide installation with: diff --git a/latex.el b/latex.el index 866b0f74..94801b00 100644 --- a/latex.el +++ b/latex.el @@ -4138,6 +4138,10 @@ consideration just as is in the non-commented source code." ("Vmatrix" LaTeX-indent-tabular) ("smallmatrix" LaTeX-indent-tabular) ("cases" LaTeX-indent-tabular) + ;; env of longtable.sty + ("longtable" LaTeX-indent-tabular) + ;; env of ltcaption.sty + ("longtable*" LaTeX-indent-tabular) ;; envs of mathtools.sty ("matrix*" LaTeX-indent-tabular) ("pmatrix*" LaTeX-indent-tabular) @@ -4161,12 +4165,19 @@ consideration just as is in the non-commented source code." ("drcases" LaTeX-indent-tabular) ("drcases*" LaTeX-indent-tabular) ("cases*" LaTeX-indent-tabular) + ;; envs of stabular.sty + ("stabular" LaTeX-indent-tabular) + ("stabular*" LaTeX-indent-tabular) ;; envs of supertabular.sty ("supertabular" LaTeX-indent-tabular) ("supertabular*" LaTeX-indent-tabular) ("mpsupertabular" LaTeX-indent-tabular) ("mpsupertabular*" LaTeX-indent-tabular) ;; envs of tabularray.sty + ("tblr" LaTeX-indent-tabular) + ("longtblr" LaTeX-indent-tabular) + ("talltblr" LaTeX-indent-tabular) + ("booktabs" LaTeX-indent-tabular) ("+array" LaTeX-indent-tabular) ("+matrix" LaTeX-indent-tabular) ("+bmatrix" LaTeX-indent-tabular) @@ -4175,6 +4186,12 @@ consideration just as is in the non-commented source code." ("+vmatrix" LaTeX-indent-tabular) ("+Vmatrix" LaTeX-indent-tabular) ("+cases" LaTeX-indent-tabular) + ;; env from tabularx.sty + ("tabularx" LaTeX-indent-tabular) + ;; env from tabulary.sty + ("tabulary" LaTeX-indent-tabular) + ;; env from xltabular.sty + ("xltabular" LaTeX-indent-tabular) ;; envs of xtab.sty ("xtabular" LaTeX-indent-tabular) ("xtabular*" LaTeX-indent-tabular) @@ -4199,7 +4216,8 @@ Environments present in this list are not filled by filling functions, see `LaTeX-fill-region-as-paragraph'." :group 'LaTeX-indentation :type '(repeat (list (string :tag "Environment") - (option function)))) + (option function))) + :package-version '(auctex . "14.0.7")) (defcustom LaTeX-indent-environment-check t "If non-nil, check for any special environments." diff --git a/style/longtable.el b/style/longtable.el index 659f67a7..f34e3b47 100644 --- a/style/longtable.el +++ b/style/longtable.el @@ -128,12 +128,6 @@ insert line break macro." ;; This parameter is set with \setcounter (LaTeX-add-counters "LTchunksize") - ;; Use the enhanced table formatting. Append to - ;; `LaTeX-indent-environment-list' in order not to override custom - ;; settings. - (add-to-list (make-local-variable 'LaTeX-indent-environment-list) - '("longtable" LaTeX-indent-tabular) t) - ;; Append longtable to `LaTeX-label-alist', in order not to override ;; possible custome values. (add-to-list 'LaTeX-label-alist '("longtable" . LaTeX-table-label) t) diff --git a/style/ltcaption.el b/style/ltcaption.el index a19cb3b3..feefd89a 100644 --- a/style/ltcaption.el +++ b/style/ltcaption.el @@ -1,6 +1,6 @@ ;;; ltcaption.el --- AUCTeX style for `ltcaption.sty' version v1.4c -*- lexical-binding: t; -*- -;; Copyright (C) 2022 Free Software Foundation, Inc. +;; Copyright (C) 2022--2024 Free Software Foundation, Inc. ;; Author: Arash Esbati <ar...@gnu.org> ;; Maintainer: auctex-devel@gnu.org @@ -96,12 +96,6 @@ (LaTeX-add-environments '("longtable*" LaTeX-env-longtable*)) - ;; Use the enhanced table formatting. Append to - ;; `LaTeX-indent-environment-list' in order not to override custom - ;; settings. - (add-to-list (make-local-variable 'LaTeX-indent-environment-list) - '("longtable*" LaTeX-indent-tabular) t) - ;; Append 'longtable*' to `LaTeX-item-list' with `LaTeX-item-longtable': (add-to-list 'LaTeX-item-list '("longtable*" . LaTeX-item-longtable) t) diff --git a/style/stabular.el b/style/stabular.el index 02c29f2b..ad71f792 100644 --- a/style/stabular.el +++ b/style/stabular.el @@ -1,6 +1,6 @@ ;;; stabular.el --- AUCTeX style for `stabular.sty' (v2.1) -*- lexical-binding: t; -*- -;; Copyright (C) 2021 Free Software Foundation, Inc. +;; Copyright (C) 2021--2024 Free Software Foundation, Inc. ;; Author: Arash Esbati <ar...@gnu.org> ;; Maintainer: auctex-devel@gnu.org @@ -45,17 +45,6 @@ '("stabular" LaTeX-env-array) '("stabular*" LaTeX-env-tabular*)) - ;; Use the enhanced tabular indentation. Append to - ;; `LaTeX-indent-environment-list' in order not to override custom - ;; settings. - (make-local-variable 'LaTeX-indent-environment-list) - (add-to-list 'LaTeX-indent-environment-list - '("stabular" LaTeX-indent-tabular) - t) - (add-to-list 'LaTeX-indent-environment-list - '("stabular*" LaTeX-indent-tabular) - t) - ;; Append the environments to `LaTeX-item-list': (add-to-list 'LaTeX-item-list '("stabular" . LaTeX-item-array) diff --git a/style/tabularx.el b/style/tabularx.el index 0c36b30e..6b30c26b 100644 --- a/style/tabularx.el +++ b/style/tabularx.el @@ -40,10 +40,6 @@ (lambda () ;; Make tabularx the default tabular environment (setq LaTeX-default-tabular-environment "tabularx") - ;; Use the enhanced tabular indentation. Append to - ;; `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) diff --git a/style/tabulary.el b/style/tabulary.el index 9c982e6a..a4b9fbfb 100644 --- a/style/tabulary.el +++ b/style/tabulary.el @@ -41,13 +41,6 @@ ;; Make tabulary the default tabular environment (setq LaTeX-default-tabular-environment "tabulary") - ;; Use the enhanced tabular indentation. Append to - ;; `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) - t) - ;; Append tabulary to `LaTeX-item-list' with `LaTeX-item-tabular*' (add-to-list 'LaTeX-item-list '("tabulary" . LaTeX-item-tabular*) t) diff --git a/style/xltabular.el b/style/xltabular.el index e87d4b32..1fc7f467 100644 --- a/style/xltabular.el +++ b/style/xltabular.el @@ -1,6 +1,6 @@ ;;; xltabular.el --- AUCTeX style for `xltabular.sty' (v0.05) -*- lexical-binding: t; -*- -;; Copyright (C) 2017--2022 Free Software Foundation, Inc. +;; Copyright (C) 2017--2024 Free Software Foundation, Inc. ;; Author: Arash Esbati <ar...@gnu.org> ;; Maintainer: auctex-devel@gnu.org @@ -121,11 +121,6 @@ If SUPPRESS is non-nil, do not insert line break macro." ;; Add xltabular with `LaTeX-env-xltabular':: (LaTeX-add-environments '("xltabular" LaTeX-env-xltabular)) - ;; Use the enhanced table formatting. Append to - ;; `LaTeX-indent-environment-list' in order not to override custom settings. - (add-to-list (make-local-variable 'LaTeX-indent-environment-list) - '("xltabular" LaTeX-indent-tabular) t) - ;; Append xltabular to `LaTeX-label-alist', in order not to ;; override possible custome values. (add-to-list 'LaTeX-label-alist '("xltabular" . LaTeX-table-label) t)