[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] [elpa] externals/auctex c731038844 11/60: Improve regexp
From: |
Tassilo Horn |
Subject: |
[AUCTeX-diffs] [elpa] externals/auctex c731038844 11/60: Improve regexp matching new environments |
Date: |
Fri, 8 Apr 2022 11:52:47 -0400 (EDT) |
branch: externals/auctex
commit c731038844f059d2395f3fc2bc79fbe01485a3d9
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>
Improve regexp matching new environments
* style/newfloat.el
(LaTeX-newfloat-DeclareFloatingEnvironment-regexp): Add 'p' to the
name of the variable. Use the function
`LaTeX-extract-key-value-label' to build the regexp. Be more
restrictive when matching the type of declared environment.
---
style/newfloat.el | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/style/newfloat.el b/style/newfloat.el
index 74185bd67d..5cde1d4c7a 100644
--- a/style/newfloat.el
+++ b/style/newfloat.el
@@ -1,6 +1,6 @@
;;; newfloat.el --- AUCTeX style for `newfloat.sty' (v1.1-109) -*-
lexical-binding: t; -*-
-;; Copyright (C) 2015--2021 Free Software Foundation, Inc.
+;; Copyright (C) 2015--2022 Free Software Foundation, Inc.
;; Author: Arash Esbati <arash@gnu.org>
;; Maintainer: auctex-devel@gnu.org
@@ -82,15 +82,15 @@
;; Setup parsing for \DeclareFloatingEnvironment:
(TeX-auto-add-type "newfloat-DeclareFloatingEnvironment" "LaTeX")
-(defvar LaTeX-newfloat-DeclareFloatingEnvironment-regex
+(defvar LaTeX-newfloat-DeclareFloatingEnvironment-regexp
`(,(concat "\\\\DeclareFloatingEnvironment"
"[ \t\n\r%]*"
- "\\["
- "[ \t\n\r%{}a-zA-Z0-9=,-]*"
- "\\]"
+ "\\(?:"
+ (LaTeX-extract-key-value-label 'none)
+ "\\)?"
"[ \t\n\r%]*"
"{\\([^}]+\\)}"
- "\\(?:[ %]*{\\([^}]*\\)}\\)?")
+ "\\(?:[ %]*{\\(figure\\|table\\|verbatim\\)}\\)?")
(1 2) LaTeX-auto-newfloat-DeclareFloatingEnvironment)
"Matches the argument of `\\DeclareFloatingEnvironment' from
`newfloat.sty'.")
@@ -152,7 +152,7 @@ If `caption.el' is loaded, add the new floating environment
to
(lambda ()
;; Add newfloat to the parser.
- (TeX-auto-add-regexp LaTeX-newfloat-DeclareFloatingEnvironment-regex)
+ (TeX-auto-add-regexp LaTeX-newfloat-DeclareFloatingEnvironment-regexp)
;; Commands:
(TeX-add-symbols
- [AUCTeX-diffs] [elpa] externals/auctex 4bcda2d50c 35/60: Improve indentation in env from algpseudocode package, (continued)
- [AUCTeX-diffs] [elpa] externals/auctex 4bcda2d50c 35/60: Improve indentation in env from algpseudocode package, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 1823017839 55/60: Wrap the 'function' environment better with %, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 36655f6a5e 24/60: Revert "Fix simultaneity", Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex fce8b94ca8 41/60: Update documentation with respect to indent, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 8938787491 37/60: ; * style/algpseudocode.el ("algpseudocode"): Fix "While"., Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex eb4e331bd6 51/60: Add news for new indent feature, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex a2724f3677 15/60: Don't set syntax-propertize-function in defaults, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex e83ca6a072 57/60: Update style/doc.el to package version 3.0h, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex f9356664c8 23/60: Update documentation, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 78cf12b33c 18/60: ; * doc/auctex.texi: Adjust the year in @copying., Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex c731038844 11/60: Improve regexp matching new environments,
Tassilo Horn <=
- [AUCTeX-diffs] [elpa] externals/auctex 259ffc34c4 12/60: Use DEFAULT argument of `TeX-read-string' in styles, Tassilo Horn, 2022/04/08
- [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