2014-08-13 15:31 GMT+02:00 Tassilo Horn <[email protected]>: > Mosè Giordano <[email protected]> writes: > >> Actually, I'm noticing `LaTeX-insert-label' overlaps with >> `LaTeX-label-alist' (which is undocumented in the AUCTeX manual) and >> `LaTeX-section-label'. The problem is that when RefTeX is used, >> `reftex-label' ignores `LaTeX-label-alist' and `LaTeX-section-label', >> instead `LaTeX-insert-label' is valuated before calling >> `reftex-label'. >> >> We could completely remove the new `LaTeX-insert-label' and check with >> `LaTeX-label-alist' and `LaTeX-section-label' whether a label should >> be inserted, before calling `reftex-label'. What do you think? > > 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. Bye, Mosè
patch
Description: Binary data
_______________________________________________ auctex-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/auctex-devel
