How do I declare custom completions for command arguments to AUCTeX?
I have a LaTeX package that defines a number of macros. I'm writing the Elisp style support manually as some of the TeX code is rather hairy. One of the macros is \ref
-like, so in the style support file, I have
(TeX-add-symbols '("myref" TeX-arg-ref))
If I insert \ref
or \myref
with TeX-insert-macro
, I get prompted for a label with completion. If I type \ref{
and press M-TAB
(TeX-complete-symbol
), I get completions of labels. But if I type \myref{
and press M-TAB
, I only get the fallback to dictionary words.
How do I tell AUCTeX that the first argument of \myref
should be completed as a label?