From 886fec8a8c5d862b1f33fc794c6b3b6aed3e8b05 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Fri, 23 Sep 2016 22:08:02 -0400 Subject: latex-imenu-create-index-function: Use rx --- lisp/km-tex.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lisp/km-tex.el') diff --git a/lisp/km-tex.el b/lisp/km-tex.el index f3f0727..aef7e8e 100644 --- a/lisp/km-tex.el +++ b/lisp/km-tex.el @@ -27,7 +27,8 @@ ;; See `LaTeX-imenu-create-index-function'. (TeX-update-style) (let ((sec-re (LaTeX-outline-regexp)) - (title-re "\\*\\{0,1\\}{\\([^}]*\\)}") + (title-re (rx (zero-or-one "*") + "{" (group (zero-or-more (not (any "}")))))) entries) (goto-char (point-min)) (while (re-search-forward sec-re nil t) -- cgit v1.2.3