Hi Tassilo, 2014-08-14 9:16 GMT+02:00 Tassilo Horn <t...@gnu.org>: > Mosè Giordano <m...@gnu.org> writes: > > Hi Mosè, > >>> You mean, if the environment or sectioning command is not in >>> `LaTeX-label-alist' or `LaTeX-section-label', then no label will be >>> prompted? >> >> Exactly! >> >>> That might be an idea... >> >> The attached patch is more or a less a re-ordering of the original >> `LaTeX-label': the prefix is calculated at the beginning of the >> function and if it's non nil the label is inserted, with RefTeX or >> AUCTeX built-in mechanism. The second argument of `LaTeX-label' makes >> it possible to have different rules for environments and sections with >> the same name. > > Looks good to me. But there's one thing I'm not sure. Styles like > amsmath.el add environments to `LaTeX-label-alist', so what should a > user do, e.g., to tell auctex that she doen't want labels for align > environments?
Indeed I'm not convinced that style files should change the value of customizable variables. > AFAICS, she would need to create an own amsmath.el style file in > `TeX-style-private' which removes the "align" entry from > `LaTeX-label-alist'. Could you please check if that works, and if so, > document it. (Or if there is a better way, that's also fine). In the patch I submitted, the amsmath and longtable environments are appended to `LaTeX-label-alist', instead of being prepended as they were before, so a user can add a ("align" . nil) entry in `LaTeX-label-alist' and it won't be overridden by amsmath.el. Actually, I believe the best way would be to add amsmath and longtable environments to default `LaTeX-label-alist' in latex.el. Bye, Mosè _______________________________________________ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel