Subject: Re: bug#62278: 28.2; Outline in DocTeX mode

From: Arash Esbati <[email-masked]>
Date: Mon, 27 Mar 2023 12:14:09 +0200

Jan Braun <[email-masked]> writes:

> Your fix only works in a plain Emacsen, being started without 
> any kind of init file. :-(
>
> So, in principle, your fix works, but not, if I place it in my 
> init file.

You mean putting this in your init file still throws an error?

  (with-eval-after-load "tex-mode"
    (add-hook 'doctex-mode-hook
              (lambda ()
                (setq-local latex-outline-regexp
                            (concat "[% \t]*" "\\\\"
                                    (regexp-opt
                                     (append latex-metasection-list
                                             (mapcar #'car latex-section-alist))
                                     t)))
                (setq-local outline-regexp latex-outline-regexp))))

Best, Arash