[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 1c9de7e 29/36: Count *-operator in column specif
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 1c9de7e 29/36: Count *-operator in column specification |
Date: |
Thu, 22 Dec 2016 13:08:12 +0000 (UTC) |
branch: externals/auctex
commit 1c9de7e71aa03fc333b1009fa74d10278f8068b5
Author: Arash Esbati <address@hidden>
Commit: Arash Esbati <address@hidden>
Count *-operator in column specification
* latex.el (LaTeX-array-count-columns): Detect *-operator in
column specification and count the arguments for final calculation
of columns. Thanks to Ikumi Keita for pointing out this
deficiency and code to fix it.
---
latex.el | 29 ++++++++++++++++++++++++-----
1 file changed, 24 insertions(+), 5 deletions(-)
diff --git a/latex.el b/latex.el
index 19542b1..e5601fb 100644
--- a/latex.el
+++ b/latex.el
@@ -1373,12 +1373,31 @@ right number."
;; The below block accounts for one unit of move for
;; one column.
- (setq cols (+ cols (skip-chars-forward
- LaTeX-array-column-letters end)))
+ (setq cols (+ cols
+ ;; treat *-operator specially.
+ (if (eq (following-char) ?*)
+ ;; *-operator is there.
+ (progn
+ ;; pick up repetition number and count
+ ;; how many columns are repeated.
+ (re-search-forward
+ "\\*[ \t\r\n%]*{[ \t\r\n%]*\\([0-9]+\\)[
\t\r\n%]*}" end)
+ (let ((n (string-to-number
+ (match-string-no-properties 1)))
+ ;; get start and end of repeated spec.
+ (s (progn (down-list 1) (point)))
+ (e (progn (up-list 1) (1- (point)))))
+ (* n (1+ (LaTeX-array-count-columns s e)))))
+ ;; not *-operator.
+ (skip-chars-forward
+ LaTeX-array-column-letters end))))
+ ;; Do not skip over `*' (see above) and `[' (siunitx has `S[key=val]':):
(skip-chars-forward (concat
- "^" LaTeX-array-column-letters
- TeX-grop) end)
- (if (eq (following-char) ?{) (forward-list 1))
+ "^" LaTeX-array-column-letters "*"
+ TeX-grop LaTeX-optop) end)
+ (when (or (eq (following-char) ?\{)
+ (eq (following-char) ?\[))
+ (forward-list 1))
;; Not sure whether this is really necessary or not, but
;; prepare for possible infinite loop anyway.
- [elpa] externals/auctex e4aba95 21/36: Support RefTeX with `reftex-add-label-environments' in style/mathtools.el, (continued)
- [elpa] externals/auctex e4aba95 21/36: Support RefTeX with `reftex-add-label-environments' in style/mathtools.el, Tassilo Horn, 2016/12/22
- [elpa] externals/auctex f04e5f7 09/36: Add style file for amsfonts package, Tassilo Horn, 2016/12/22
- [elpa] externals/auctex c4cb166 33/36: Add style/ directory to TeX-style-path for tests, Tassilo Horn, 2016/12/22
- [elpa] externals/auctex 25e4f33 03/36: Add new style/FiraSans.el, Tassilo Horn, 2016/12/22
- [elpa] externals/auctex c073d3e 12/36: Insert \label inside the mandatory argument of \caption, Tassilo Horn, 2016/12/22
- [elpa] externals/auctex 0d26aba 01/36: Suggest to display warnings when there are no errors in error overview, Tassilo Horn, 2016/12/22
- [elpa] externals/auctex 6a31d4e 14/36: Support new floats defined with newfloat package, Tassilo Horn, 2016/12/22
- [elpa] externals/auctex 29ae5fb 15/36: Add \LTXtable to list of file-loading commands, Tassilo Horn, 2016/12/22
- [elpa] externals/auctex 76db91e 27/36: Accept non-letter characters as column specifier, Tassilo Horn, 2016/12/22
- [elpa] externals/auctex e3c60cf 08/36: Add new style/bicaption.el, Tassilo Horn, 2016/12/22
- [elpa] externals/auctex 1c9de7e 29/36: Count *-operator in column specification,
Tassilo Horn <=
- [elpa] externals/auctex 70c6499 34/36: Fix to TeX-add-local-master, Tassilo Horn, 2016/12/22
- [elpa] externals/auctex 66ed2ac 30/36: Add test for new column counting code, Tassilo Horn, 2016/12/22
- [elpa] externals/auctex a833aff 26/36: Use `LaTeX-item-longtable' while inserting longtable's, Tassilo Horn, 2016/12/22
- [elpa] externals/auctex 80d2a08 10/36: Min fix to kpfonts package, Tassilo Horn, 2016/12/22
- [elpa] externals/auctex 79c8264 19/36: Fix query for defined colors in style/textpos.el, Tassilo Horn, 2016/12/22
- [elpa] externals/auctex 0265793 25/36: Add "s" and "S" to `LaTeX-array-column-letters', Tassilo Horn, 2016/12/22
- [elpa] externals/auctex 7518a8a 31/36: Mention that arguments to *-operator must be in braces, Tassilo Horn, 2016/12/22
- [elpa] externals/auctex db3fcb9 32/36: * tex.el (TeX-add-local-master): Inherit major mode from master file., Tassilo Horn, 2016/12/22
- [elpa] externals/auctex 1aa46c3 23/36: ; Use third argument of `TeX-argument-insert', Tassilo Horn, 2016/12/22
- [elpa] externals/auctex 40da84e 20/36: Support RefTeX with `reftex-add-label-environments' in style/empheq.el, Tassilo Horn, 2016/12/22