Subject: bug#73302: TeX-find-closing-brace and verbatim macros

From: Paul Nelson <[email-masked]>
Date: Thu, 19 Sep 2024 17:35:32 +0200

Hi Ikumi,

Sure, I'd be happy to work on this.

> TeX-fold-mode is supposed to run in none-LaTeX-mode buffers, so
> `LaTeX-verbatim-p' should be wrapped with some conditional using
> `derived-mode-p'. Can you work on it?
>
> (Actually, AUCTeX has generic function `TeX-verbatim-p', but only LaTeX
> mode has meaningful implementation for it.)

According to the documentation, TeX-verbatim-p always returns nil
outside LaTeX-mode, so it seems to me that to fix the issue you raise,
it would suffice to use that function in place of LaTeX-verbatim-p
(rather than doing derive-mode-p checks).  Does that sound right to
you?  (I never use the other modes, so my knowledge there is a bit
spotty.)

Thanks, best,

Paul