>>>>> Stefan Monnier <monn...@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