On Sun, Jan 4, 2026 at 1:49 PM Pedro Andres Aranda Gutierrez
<[email protected]> wrote:
>
> Would there be any workaround using major-mode-remap-alist directly?
> That was introduced in <= 29.1 as per describe-variable

Yes, that would be how you'd support Emacs 29.  Probably let-bind
major-mode-remap-defaults with the autoloaded values in Emacs 30
(i.e., LaTeX-mode, plain-TeX-mode and TeX-mode) and then essentially
perform the same lookups that major-mode-remap does.  For Emacs 28 and
older, you could also let-bind major-mode-remap-alist to nil and use
the same autoloaded value of major-mode-remap-defaults.  I think that
would address the other places in org-mode that currently fallback on
LaTeX-mode when major-mode-remap is not available and the entire "if"
expressions could just be replaced by a call to the newly created
org-major-mode-remap defun.  Ideally, that would probably all reside
in a compat.el major-mode-remap defun if compat.el included that
function and Org moved in that direction.


Troy.

Reply via email to