> be a derived mode of `latex-mode'. However, defining `LaTeX-mode' by
> (define-derived-mode LaTeX-mode latex-mode ...) would cause infinite
> loop when redirection is enabled.

Yes, it's ugly.  That's part of the reason for the weird way we define
`tex-mode` in `tex-mode.el` (and that was preceded by other weird ways
to do it).

I have an idea for how we should solve this in general in Emacs, but in
the mean time a hack like the (or delay-mode-hooks tex-mode--recursing)
I used in `tex--redirect-to-submode` is about as good as I could make
it :-(

> I expect that we can circumvent the difficulty by putting
> `derived-mode-parent' property on `LaTeX-mode', without
> `define-derived-mode'.

That's another option, indeed.


        Stefan


Reply via email to