[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] [elpa] externals/auctex fa8842c626 26/60: Recognize macro
From: |
Tassilo Horn |
Subject: |
[AUCTeX-diffs] [elpa] externals/auctex fa8842c626 26/60: Recognize macrocode*? environments in doctex-mode |
Date: |
Fri, 8 Apr 2022 11:52:50 -0400 (EDT) |
branch: externals/auctex
commit fa8842c626996a60dbd99e420d6bfb683be28fe4
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>
Recognize macrocode*? environments in doctex-mode
* latex.el (LaTeX-current-environment): Don't ignore whitespaces
and other characters than letters in regexp for searching the name
of the environment. In doctex-mode, handle the macrocode*?
environments specially and find them if invoked from a non-comment
line.
---
latex.el | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/latex.el b/latex.el
index d48522fee0..4de9760016 100644
--- a/latex.el
+++ b/latex.el
@@ -917,7 +917,7 @@ work analogously."
(save-excursion
(while (and (/= arg 0)
(re-search-backward
- "\\\\\\(begin\\|end\\) *{ *\\([A-Za-z*]+\\) *}" nil t))
+ "\\\\\\(begin\\|end\\) *{\\([^}]+\\)}" nil t))
(when (or (and LaTeX-syntactic-comments
(eq in-comment (TeX-in-commented-line))
(or (not in-comment)
@@ -925,7 +925,15 @@ work analogously."
;; commented case.
(string= comment-prefix (TeX-comment-prefix))))
(and (not LaTeX-syntactic-comments)
- (not (TeX-in-commented-line))))
+ (not (TeX-in-commented-line)))
+ ;; macrocode*? in docTeX-mode is special since we
+ ;; have also regular code lines not starting with a
+ ;; comment-prefix. Hence, the next check just looks
+ ;; if we're inside such a group and returns t to
+ ;; recognize such a situation.
+ (and (eq major-mode 'doctex-mode)
+ (member (match-string-no-properties 2)
+ '("macrocode" "macrocode*"))))
(setq arg (if (string= (match-string 1) "end") (1+ arg) (1- arg)))))
(if (/= arg 0)
"document"
- [AUCTeX-diffs] [elpa] externals/auctex 0ce906cfc7 32/60: Improve indentation of conditionals, (continued)
- [AUCTeX-diffs] [elpa] externals/auctex 0ce906cfc7 32/60: Improve indentation of conditionals, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex b7d45e19c6 22/60: Discard obsolete hook, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 2b11084455 30/60: ; * style/l3doc.el (LaTeX-env-l3doc-function): Delete unused var., Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 238dad67f9 04/60: Introduce DEFAULT argument in `TeX-arg-length', Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 7b0cbbb465 38/60: Document feature of []-induced indent, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 4b1c7015ae 45/60: Move contents of tex-buf.el into tex.el, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex e032df90e7 05/60: Fix simultaneity, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex a078fda16b 06/60: ; * doc/auctex.texi (Starting a Command): Delete obosolete comment., Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex b1a0d5df74 36/60: ; * style/algpseudocode.el: Fix position of TeX-dialect., Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 1bc2630275 20/60: Don't change syntax of ^^A comments in doctex mode (bug#35140), Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex fa8842c626 26/60: Recognize macrocode*? environments in doctex-mode,
Tassilo Horn <=
- [AUCTeX-diffs] [elpa] externals/auctex 45aff50ff3 48/60: Support \mathcolor in style/x?color.el, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 5d2829aed4 49/60: Remove old defadvices (patch by Stefan Monnier), Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 5cf46ff8e2 52/60: Improve parsing of re-definitions, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 03ed9004cd 60/60: Merge remote-tracking branch 'origin/master' into externals/auctex, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex c050335dd8 21/60: ; Fix typo, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 69b78fcc26 54/60: Don't change indentation when defining a conditional, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 323eb08ca6 46/60: Assign reasonable sentinel in AmS-TeX mode, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 2af3c1bcbd 33/60: Add new style/ifthen.el, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex e1c3e37e0c 56/60: ; Update copyright year, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 3df1e313ea 25/60: Adapt TeX-region-hook for lexical-binding, Tassilo Horn, 2022/04/08