[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX-devel] Manage auto insertion of labels

From: Mosè Giordano
Subject: Re: [AUCTeX-devel] Manage auto insertion of labels
Date: Wed, 13 Aug 2014 17:29:30 +0200

2014-08-13 15:31 GMT+02:00 Tassilo Horn <address@hidden>:
> Mosè Giordano <address@hidden> 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?


> 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.


Attachment: patch
Description: Binary data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]