[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX] Test whether the point is inside a TeX command
From: |
Evgeny Makarov |
Subject: |
Re: [AUCTeX] Test whether the point is inside a TeX command |
Date: |
Sat, 29 Nov 2014 17:09:13 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Mosè Giordano <mose <at> gnu.org> writes:
> take a look at `TeX-current-macro' in tex.el
Thanks. Unfortunately, this function returns nil when the point is at the
end of a macro, as in "\textbf-!-". My idea is to change the
input-method-function so that it checks whether the point is in a place
where only English makes sense. Of course, when I am typing a macro, the
point is at the end of the macro, and I want my function to return t.
For now, I wrote the following function, and it seems to work.
(defun inside-macro-p ()
(save-excursion
(skip-chars-backward "@A-Za-z")
(TeX-escaped-p)))
Evgeny