Hi Tassilo, >>>>> Tassilo Horn <t...@gnu.org> writes: > That sounds reasonable in the current case. OTOH, it could be that > users set things like outline-regexp in those mode-hooks which would > then be overridden by our set-up code if that ran after the hooks...
Hmm, how about adding locally-bound test like this? (defun TeX-latex-mode () ... (LaTeX-common-initialization) ... (run-mode-hooks 'text-mode-hook 'TeX-mode-hook 'LaTeX-mode-hook) ... (or (local-variable-p 'outline-regexp) (setq-local outline-regexp (LaTeX-outline-regexp t)) (or (local-variable-p 'outline-heading-alist) (setq outline-heading-alist (mapcar (lambda (x) (cons (concat "\\" (nth 0 x)) (nth 1 x))) LaTeX-section-list))) ... (I noticed that this doesn't work as expected for doctex-mode because `run-mode-hooks' doesn't run hooks and `hack-local-variables' when latex-mode is called as parent of doctex-mode. We need to switch to "feature/fix-mode-names-overlap" branch, to define all major modes by `define-derived-mode', for clean solution.) Regards, Ikumi Keita #StandWithUkraine #StopWarInUkraine _______________________________________________ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex