summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/km-tex.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/km-tex.el b/lisp/km-tex.el
index aef7e8e..b32ef84 100644
--- a/lisp/km-tex.el
+++ b/lisp/km-tex.el
@@ -27,6 +27,8 @@
;; See `LaTeX-imenu-create-index-function'.
(TeX-update-style)
(let ((sec-re (LaTeX-outline-regexp))
+ (short-re (rx (zero-or-one "*")
+ "[" (group (zero-or-more (not (any "]")))) "]"))
(title-re (rx (zero-or-one "*")
"{" (group (zero-or-more (not (any "}"))))))
entries)
@@ -34,7 +36,8 @@
(while (re-search-forward sec-re nil t)
(let ((sec (replace-regexp-in-string
"\\\\" "" (match-string-no-properties 0)))
- (title (and (looking-at title-re)
+ (title (and (or (looking-at short-re)
+ (looking-at title-re))
(replace-regexp-in-string
"\\s-\\s-+" " "
(replace-regexp-in-string