auctex
[Top][All Lists]

## [AUCTeX] Test whether the point is inside a TeX command

 From: Evgeny Makarov Subject: [AUCTeX] Test whether the point is inside a TeX command Date: Sat, 29 Nov 2014 16:13:39 +0000 (UTC) User-agent: Loom/3.14 (http://gmane.org/)

Hello,

AUCTeX has the function texmathp that determines if the point is inside
LaTeX math mode. Is there a similar function that determined if the point is
inside a LaTeX command? For example, it should return t when the buffer
contains "\text_" (_ denotes the point). I am talking only about the
command's name, not necessarily its arguments. Is there a function that
determines if the point is inside an environment name, as in "\begin{_}"?

I am asking this because I am trying to minimize the need to switch the
input method when I am typing a document in a different language. Math
formulas, command names and environment names are things that have to be
typed in English.

Thanks,
Evgeny