[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 8ae405b9 1/2: Save regexp groups
|
From: |
Arash Esbati |
|
Subject: |
master 8ae405b9 1/2: Save regexp groups |
|
Date: |
Sat, 11 Nov 2023 15:35:50 -0500 (EST) |
branch: master
commit 8ae405b9195d1c449949d930d0b2bf91458cbf48
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>
Save regexp groups
* latex.el (LaTeX-auto-minimal-regexp-list)
(LaTeX-auto-class-regexp-list): Use shy groups where possible.
---
latex.el | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/latex.el b/latex.el
index 7bada422..5e884555 100644
--- a/latex.el
+++ b/latex.el
@@ -1734,12 +1734,12 @@ right number."
(defvar LaTeX-auto-minimal-regexp-list
'(("\\\\document\\(style\\|class\\)\
-\\(\\[\\(\\([^#\\%]\\|%[^\n\r]*[\n\r]\\)*\\)\\]\\)?\
+\\(?:\\[\\(\\(?:[^#\\%]\\|%[^\n\r]*[\n\r]\\)*\\)\\]\\)?\
{\\([^#\\.\n\r]+?\\)}"
- (3 5 1) LaTeX-auto-style)
- ("\\\\use\\(package\\)\\(\\[\\([^]]*\\)\\]\\)?\
+ (2 3 1) LaTeX-auto-style)
+ ("\\\\use\\(package\\)\\(?:\\[\\([^]]*\\)\\]\\)?\
{\\(\\([^#}\\.%]\\|%[^\n\r]*[\n\r]\\)+?\\)}"
- (3 4 1) LaTeX-auto-style))
+ (2 3 1) LaTeX-auto-style))
"Minimal list of regular expressions matching LaTeX macro definitions.")
(defvar LaTeX-auto-label-regexp-list
@@ -1761,15 +1761,15 @@ This is necessary since index entries may contain
commands and stuff.")
(defvar LaTeX-auto-class-regexp-list
`(;; \RequirePackage[<options>]{<package>}[<date>]
- ("\\\\Require\\(Package\\)\\(\\[\\([^]]*\\)\\]\\)?\
+ ("\\\\Require\\(Package\\)\\(?:\\[\\([^]]*\\)\\]\\)?\
{\\([^#\\.\n\r]+?\\)}"
- (3 4 1) LaTeX-auto-style)
+ (2 3 1) LaTeX-auto-style)
;; \RequirePackageWithOptions{<package>}[<date>],
("\\\\Require\\(Package\\)WithOptions\\(\\){\\([^#\\.\n\r]+?\\)}"
(2 3 1) LaTeX-auto-style)
;; \LoadClass[<options>]{<package>}[<date>]
- ("\\\\Load\\(Class\\)\\(\\[\\([^]]*\\)\\]\\)?{\\([^#\\.\n\r]+?\\)}"
- (3 4 1) LaTeX-auto-style)
+ ("\\\\Load\\(Class\\)\\(?:\\[\\([^]]*\\)\\]\\)?{\\([^#\\.\n\r]+?\\)}"
+ (2 3 1) LaTeX-auto-style)
;; \LoadClassWithOptions{<package>}[<date>]
("\\\\Load\\(Class\\)WithOptions\\(\\){\\([^#\\.\n\r]+?\\)}"
(2 3 1) LaTeX-auto-style)
| [Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 8ae405b9 1/2: Save regexp groups,
Arash Esbati <=