Subject: texmathp and literal $
From: Arash Esbati <[email-masked]>
To: auctex-bugs <[email-masked]>
Date: Fri, 10 Feb 2023 21:16:22 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi all,

please consider this small example:

--8<---------------cut here---------------start------------->8---
\documentclass{article}

\begin{document}

text \verb|$|

\end{document}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:
--8<---------------cut here---------------end--------------->8---

Now do:

  M-: (goto-char 58) RET
  C-c C-f C-t

and AUCTeX insert \mathtt{} at point.  Doing 'M-x texmathp RET' returns:

  math-mode is on: $ begins at buffer position 55

texmathp ignores the verb macro completely.  The similar scenario can be
created for a verbatim-like environment.  Can others reproduce this?
And if yes, any idea about course of action?

Best, Arash