[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 148/299: Add default tabular-like env for use in tables.
From: |
Stefan Monnier |
Subject: |
[elpa] 148/299: Add default tabular-like env for use in tables. |
Date: |
Sun, 02 Nov 2014 03:11:01 +0000 |
monnier pushed a commit to branch externals/auctex
in repository elpa.
commit fffbd5f197b1e6ee54a25697312671556af5936f
Author: Tassilo Horn <address@hidden>
Date: Tue Jul 9 08:40:36 2013 +0200
Add default tabular-like env for use in tables.
* latex.el (LaTeX-default-tabular-environment): New variable.
(LaTeX-env-figure): Use it instead of hard-coding "tabular".
* style/tabularx.el ("tabularx"): Set
`LaTeX-default-tabular-environment' to "tabularx".
---
ChangeLog | 8 ++++++++
latex.el | 7 ++++++-
style/tabularx.el | 2 ++
3 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7a52e8e..309aa3f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-07-09 Tassilo Horn <address@hidden>
+
+ * latex.el (LaTeX-default-tabular-environment): New variable.
+ (LaTeX-env-figure): Use it instead of hard-coding "tabular".
+
+ * style/tabularx.el ("tabularx"): Set
+ `LaTeX-default-tabular-environment' to "tabularx".
+
2013-06-29 Mos� Giordano <address@hidden>
* bib-cite.el: Replace `save-excursion'+`set-buffer' with
diff --git a/latex.el b/latex.el
index 0051004..95854a0 100644
--- a/latex.el
+++ b/latex.el
@@ -502,6 +502,11 @@ is non-nil and the current environment is \"document\"."
variable overrides `LaTeX-default-environment'.")
(make-variable-buffer-local 'LaTeX-default-document-environment)
+(defvar LaTeX-default-tabular-environment "tabular"
+ "The default tabular-like environment used when inserting a table env.
+Styles such as tabularx may set it according to their needs.")
+(make-variable-buffer-local 'LaTeX-default-tabular-environment)
+
(defvar LaTeX-environment-history nil)
;; Variable used to cache the current environment, e.g. for repeated
@@ -1003,7 +1008,7 @@ job to this function."
;; Suppose an existing tabular environment should just
;; be wrapped into a table if there is an active region.
(not active-mark))
- (LaTeX-env-array "tabular"))))
+ (LaTeX-environment-menu LaTeX-default-tabular-environment))))
(defun LaTeX-env-array (environment)
"Insert ENVIRONMENT with position and column specifications.
diff --git a/style/tabularx.el b/style/tabularx.el
index f7d9ea7..6f1005d 100644
--- a/style/tabularx.el
+++ b/style/tabularx.el
@@ -37,6 +37,8 @@
(TeX-add-style-hook
"tabularx"
(lambda ()
+ ;; Make tabularx the default tabular environment
+ (setq LaTeX-default-tabular-environment "tabularx")
;; New symbols
(TeX-add-symbols
"tracingtabularx"
- [elpa] 134/299: Fix coding once again., (continued)
- [elpa] 134/299: Fix coding once again., Stefan Monnier, 2014/11/01
- [elpa] 139/299: Generate PROBLEMS file., Stefan Monnier, 2014/11/01
- [elpa] 142/299: Update texinfo files for Git., Stefan Monnier, 2014/11/01
- [elpa] 143/299: Fix spelling errors in tex-buf.el., Stefan Monnier, 2014/11/01
- [elpa] 137/299: Better check for DBUS support., Stefan Monnier, 2014/11/01
- [elpa] 140/299: Remove warnings and docs for ancient preview problems., Stefan Monnier, 2014/11/01
- [elpa] 141/299: Prefer TeX distro GS wrappers., Stefan Monnier, 2014/11/01
- [elpa] 145/299: Select mgs only if it's functional for non-MikTeX apps., Stefan Monnier, 2014/11/01
- [elpa] 147/299: Shorter mgs check., Stefan Monnier, 2014/11/01
- [elpa] 144/299: Silence some compilation warnings., Stefan Monnier, 2014/11/01
- [elpa] 148/299: Add default tabular-like env for use in tables.,
Stefan Monnier <=
- [elpa] 150/299: Move TeX-source-correlate-method documentation to a better section., Stefan Monnier, 2014/11/01
- [elpa] 152/299: Fix fontification of some biblatex macros., Stefan Monnier, 2014/11/01
- [elpa] 146/299: Improve mgs check., Stefan Monnier, 2014/11/01
- [elpa] 151/299: New style `tabulary'., Stefan Monnier, 2014/11/01
- [elpa] 153/299: Revert changes made with commit 7531cca to font-latex.el., Stefan Monnier, 2014/11/01
- [elpa] 156/299: Document some changes for next release., Stefan Monnier, 2014/11/01
- [elpa] 154/299: Update reference from CVS to Git in some comments., Stefan Monnier, 2014/11/01
- [elpa] 149/299: Document TeX-source-correlate-method., Stefan Monnier, 2014/11/01
- [elpa] 157/299: Add *.fls and *-blx.bib to suffixes to be cleaned., Stefan Monnier, 2014/11/01
- [elpa] 155/299: Convert release process to Git., Stefan Monnier, 2014/11/01