auctex-devel
[Top][All Lists]
Advanced

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

Re: AUCTeX and "builtin latex mode" integration


From: Ikumi Keita
Subject: Re: AUCTeX and "builtin latex mode" integration
Date: Sun, 29 Oct 2023 14:50:48 +0900

>>>>> Stefan Monnier <monnier@iro.umontreal.ca> writes:
> How 'bout a hack more like:

I tried to localize the range which my advice affects, within the phase
of application of directory local variables. Now that you proposed this
approach, I think I don't have to worry about bad side effects due to
having `derived-mode-p' advised always.

>     (defvar auctex--extra-mode-parent
>       '((LaTeX-mode . latex-mode)
>         ...))

>     (advice-add 'derived-mode-p :after-until #'auctex--compat-derived-mode-p)
>     (defun auctex--compat-derived-mode-p (&rest modes)
>       (let ((extra-parent (assq major-mode auctex--extra-mode-parent)))
>         (and extra-parent (memq (cdr extra-parent) modes))))

OK, it doesn't pick up an entry of latex-mode for japanese-LaTeX-mode
yet, I expect I can arrange it to cover such cases as well. Thank you.

Best regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine



reply via email to

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