it's a function from CL.
(latex-imenu-create-index): Replace eval-when-compile with progn
because latex-section-alist is not bound while compiling.
;; Look for chapters and sections.
(goto-char (point-min))
(while (search-forward-regexp
- (eval-when-compile
+ (progn
(concat "\\\\" (regexp-opt (mapcar 'car latex-section-alist) t)
"\\*?[ \t]*{")) nil t)
(let ((start (match-beginning 0))
(defvar latex-outline-regexp
(concat "\\\\"
- (regexp-opt (list* "documentstyle" "documentclass"
- "begin{document}" "end{document}" "appendix"
+ (regexp-opt (nconc (list "documentstyle" "documentclass"
+ "begin{document}" "end{document}"
+ "appendix")
(mapcar 'car latex-section-alist)) t)))
(defun latex-outline-level ()