branch: externals/auctex
commit 1b6e5136b2a634ea9747d3515bbc6e98faa1f45c
Author: Arash Esbati <ar...@gnu.org>
Commit: Arash Esbati <ar...@gnu.org>

    ; Use `LaTeX-extract-key-value-label'
    
    * style/tcolorbox.el (LaTeX-tcolorbox-newtcolorbox-regexp)
    (LaTeX-tcolorbox-newtcbox-regexp): Use
    `LaTeX-extract-key-value-label' to build the regexp.
---
 style/tcolorbox.el | 21 +++++++--------------
 1 file changed, 7 insertions(+), 14 deletions(-)

diff --git a/style/tcolorbox.el b/style/tcolorbox.el
index d8e9ffb..cae2662 100644
--- a/style/tcolorbox.el
+++ b/style/tcolorbox.el
@@ -46,6 +46,7 @@
 
 ;; Needed for auto-parsing:
 (require 'tex)
+(require 'latex)
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
@@ -405,13 +406,9 @@
 (defvar LaTeX-tcolorbox-newtcolorbox-regexp
   `(,(concat "\\\(re\)?newtcolorbox"
             "[         
%]*"
-            "\(?:\[[^][]*"
-              "\(?:{[^}{]*"
-                "\(?:{[^}{]*"
-                  "\(?:{[^}{]*}[^}{]*\)*"
-                "}[^}{]*\)*"
-              "}[^][]*\)*"
-            "\]\)?"
+            "\(?:"
+            (LaTeX-extract-key-value-label 'none)
+            "\)?"
             "[         
%]*"
             "{\([a-zA-Z0-9]+\)}"
             "[         
%]*"
@@ -427,13 +424,9 @@
 (defvar LaTeX-tcolorbox-newtcbox-regexp
   `(,(concat "\\\(re\)?newtcbox"
             "[         
%]*"
-            "\(?:\[[^][]*"
-              "\(?:{[^}{]*"
-                "\(?:{[^}{]*"
-                  "\(?:{[^}{]*}[^}{]*\)*"
-                "}[^}{]*\)*"
-              "}[^][]*\)*"
-            "\]\)?"
+            "\(?:"
+            (LaTeX-extract-key-value-label 'none)
+            "\)?"
             "[         
%]*"
             "{\\\([a-zA-Z]+\)}"
             "[         
%]*"

_______________________________________________
auctex-diffs mailing list
auctex-di...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-diffs

Reply via email to