Ryan Kavanagh writes: > I use the cleveref package, which allows annotating \label commands with > an optional argument. Unfortunately, this prevents both AUCTeX and > RefTeX from detecting those labels. Hi Ryan, thanks for your report. Yes, AUCTeX and RefTeX both get confused with that optional argument. > I am not sufficiently familiar with emacs lisp to submit a patch, but I > think I have found some of the places that should be updated: > > * The variable LaTeX-auto-label-regexp-list in latex.el latex.el provides support for vanilla LaTeX. Additions by packages should go into AUCTeX styles. > * The function reftex-parse-from-file hardcodes the prefix "\\label{". > Perhaps this could be a customizable regexp? RefTeX provides a customizable variable for this purpose called `reftex-label-regexps'. > Please add support for cleveref labels to AUCTeX and RefTeX. This can be done within cleveref.el. A modified version is attached.