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



_______________________________________________
auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex

Reply via email to