[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: \documentclass does not activate latex-mode

From: Arash Esbati
Subject: Re: \documentclass does not activate latex-mode
Date: Thu, 18 Aug 2022 14:27:17 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50

Hi Keita,

Ikumi Keita <> writes:

> [To developpers]
> Why on earth does tex-mode.el use advice for its own function? The whole
> above piece of code can just be composed up as
> ----------------------------------------------------------------------
> (defvar tex-mode--recursing nil)
> (define-derived-mode tex-mode text-mode "generic-TeX"
>   "...doc string..."
>   ;; The file may have "mode: tex" in the local variable
>   ;; block, in which case we'll be called recursively
>   ;; infinitely.  Inhibit that.
>   (let ((tex-mode--recursing tex-mode--recursing))
>     (if (or delay-mode-hooks tex-mode--recursing)
>         ;; We're called from one of the children already.
>         (tex-common-initialization)
>       (setq tex-mode--recursing t)
>       (tex--guess-mode))))
> ----------------------------------------------------------------------
> without any advice, if I understand correctly.
> I think we should file bug report for tex-mode.el. What do others
> think?

I didn't look closely, but I trust your assessment.  Would you file a
bug report for tex-mode.el with your suggestion above?

Best, Arash

reply via email to

[Prev in Thread] Current Thread [Next in Thread]