auctex
[Top][All Lists]

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

 From: Mosè Giordano Subject: Re: [AUCTeX] Test whether the point is inside a TeX command Date: Sat, 29 Nov 2014 17:23:45 +0100

Hi Evgeny

2014-11-29 17:13 GMT+01:00 Evgeny Makarov <address@hidden>:
> 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.

take a look at TeX-current-macro' in tex.el

Bye,
Mosè

`