branch: master commit 338c5d0a4bd4ebad92549a8425e51fd346e4df5c Author: Arash Esbati <ar...@gnu.org> Commit: Arash Esbati <ar...@gnu.org>
* latex.el (LaTeX-auto-index-regexp-list): Save regexp groups. --- latex.el | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/latex.el b/latex.el index f374e558..e36455c6 100644 --- a/latex.el +++ b/latex.el @@ -1747,9 +1747,15 @@ right number." "List of regular expression matching LaTeX labels only.") (defvar LaTeX-auto-index-regexp-list - '(("\\\\\\(index\\|glossary\\){\\([^}{]*\\({[^}{]*\\({[^}{]*\\({[^}{]*}[^}{]*\\)*}[^}{]*\\)*}[^}{]*\\)*\\)}" - 2 LaTeX-auto-index-entry)) - "List of regular expression matching LaTeX index/glossary entries only. + `((,(concat "\\\\\\(?:index\\|glossary\\)" + "{\\([^}{]*" + "\\(?:{[^}{]*" + "\\(?:{[^}{]*" + "\\(?:{[^}{]*}[^}{]*\\)*}" + "[^}{]*\\)*}" + "[^}{]*\\)*\\)}") + 1 LaTeX-auto-index-entry)) + "List of regular expression matching LaTeX index/glossary entries only. Regexp allows for up to 3 levels of parenthesis inside the index argument. This is necessary since index entries may contain commands and stuff.")