[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/latex-table-wizard 7568cbbe11 39/70: Fix for tables wit
|
From: |
ELPA Syncer |
|
Subject: |
[elpa] externals/latex-table-wizard 7568cbbe11 39/70: Fix for tables with braces in the argument slot of the environment |
|
Date: |
Sat, 13 May 2023 08:59:12 -0400 (EDT) |
branch: externals/latex-table-wizard
commit 7568cbbe112db8e61e38d69308f9e51610734bf6
Author: Enrico Flor <nericoflor@gmail.com>
Commit: Enrico Flor <nericoflor@gmail.com>
Fix for tables with braces in the argument slot of the environment
---
latex-table-wizard.el | 29 +++++++++++++++++++----------
1 file changed, 19 insertions(+), 10 deletions(-)
diff --git a/latex-table-wizard.el b/latex-table-wizard.el
index 17e69f6d14..e96bbb7eb5 100644
--- a/latex-table-wizard.el
+++ b/latex-table-wizard.el
@@ -5,7 +5,7 @@
;; Author: Enrico Flor <enrico@eflor.net>
;; Maintainer: Enrico Flor <enrico@eflor.net>
;; URL: https://github.com/enricoflor/latex-table-wizard
-;; Version: 1.0.1
+;; Version: 1.0.2
;; Keywords: convenience
;; Package-Requires: ((emacs "27.1") (auctex "12.1") (transient "0.3.7"))
@@ -241,11 +241,17 @@ If the current environment is one that is mapped to
something in
"If looking at unescaped macro named NAME, go to its end.
If NAME is nil, skip any LaTeX macro that point is looking at."
- (let* ((n (or name (rx (one-or-more alnum))))
- (macro-re (concat "\\\\" n latex-table-wizard--macro-args-re)))
- (when (latex-table-wizard--unescaped-p)
- (when (looking-at macro-re)
- (match-end 0)))))
+ (save-excursion
+ (let* ((n (concat "\\(?1:" (or name (rx (one-or-more alnum))) "\\)"))
+ (macro-re (concat "\\\\" n latex-table-wizard--macro-args-re)))
+ ;; this trouble is to deal with problematic arguments to the
+ ;; environment being macro like:
+ ;; \begin{tabular}{@{} llllllll}
+ (when (and (latex-table-wizard--unescaped-p)
+ (looking-at macro-re))
+ (goto-char (match-end 1)) ; goto end of name
+ (while (looking-at-p "{\\|\\[") (forward-sexp))
+ (point)))))
(defun latex-table-wizard--skip-stuff (limit)
"Skip comments, blank space and hline macros.
@@ -312,12 +318,15 @@ argument."
;; the first step is important to avoid being fooled by
;; column or row delimiters in comments!
(forward-line))
- ((looking-at "[[:space:]]*\\\\begin{[[:alnum:]]+}")
- (skip-syntax-forward " ")
+ ((looking-at-p "[[:space:]]+")
+ (skip-syntax-forward " "))
+ ((looking-at (concat "\\\\begin"
latex-table-wizard--macro-args-re))
(forward-char 1)
(LaTeX-find-matching-end))
- ((looking-at (concat "[[:space:]]*" latex-table-wizard--macro-re))
- (goto-char (match-end 0)))
+ ((and (latex-table-wizard--unescaped-p)
+ (looking-at latex-table-wizard--macro-re))
+ (goto-char (latex-table-wizard--end-of-macro
+ (match-string-no-properties 1))))
((and (looking-at col-re)
(latex-table-wizard--unescaped-p))
;; a column delimiter: bingo
- [elpa] externals/latex-table-wizard 78aaa5b18b 67/70: Fix bug in parsing function, (continued)
- [elpa] externals/latex-table-wizard 78aaa5b18b 67/70: Fix bug in parsing function, ELPA Syncer, 2023/05/13
- [elpa] externals/latex-table-wizard a3bb0cf5f5 27/70: Replace cl-lib with seq and remove inlines, ELPA Syncer, 2023/05/13
- [elpa] externals/latex-table-wizard 63dc920fb5 54/70: Add option whether to allow or disallow detached arguments, ELPA Syncer, 2023/05/13
- [elpa] externals/latex-table-wizard b41aac096b 70/70: Change copyright assignment to FSF, ELPA Syncer, 2023/05/13
- [elpa] externals/latex-table-wizard 0252ecd876 21/70: Make latex-table-wizard--selection buffer-local, ELPA Syncer, 2023/05/13
- [elpa] externals/latex-table-wizard 583bf279a3 25/70: Typos fixed and readme expanded, ELPA Syncer, 2023/05/13
- [elpa] externals/latex-table-wizard bb01371e2a 35/70: Bump to version 1.0.0, ELPA Syncer, 2023/05/13
- [elpa] externals/latex-table-wizard f65b6e30e7 37/70: Remove old reference to void variable, ELPA Syncer, 2023/05/13
- [elpa] externals/latex-table-wizard 841bed109e 63/70: Fix bug with vacuous modification of tables, ELPA Syncer, 2023/05/13
- [elpa] externals/latex-table-wizard 80c1d68cf3 68/70: Skip sexp at opening brace, ELPA Syncer, 2023/05/13
- [elpa] externals/latex-table-wizard 7568cbbe11 39/70: Fix for tables with braces in the argument slot of the environment,
ELPA Syncer <=
- [elpa] externals/latex-table-wizard e81418a27d 40/70: Add regexp separators, ELPA Syncer, 2023/05/13
- [elpa] externals/latex-table-wizard 6085482852 46/70: Code cleanup, ELPA Syncer, 2023/05/13
- [elpa] externals/latex-table-wizard ee915860ed 51/70: Use TeX-escaped-p, ELPA Syncer, 2023/05/13
- [elpa] externals/latex-table-wizard 61fb455a1e 56/70: Single commands now take care of overlays, ELPA Syncer, 2023/05/13