Hello,

I noticed that when using the cref macro with AUCTeX, LaTeX labels
aren't completed.  This simple patch adds support for label completion
when using the cref and Cref macros.  I would like to develop this
further to add support in TeX-arg-label to read in lists of references.
Does that sounds reasonable?

Here is this patch, meanwhile. Any comments welcome.

Changelog:

2014-10-11  Matthew Leach  <[email protected]>

        * latex.el (LaTeX-common-initialization): Add a reference argument
        for cref macros.

diff --git a/latex.el b/latex.el
index 143cb4e..78f9e1b 100644
--- a/latex.el
+++ b/latex.el
@@ -5908,6 +5908,8 @@ i.e. you do _not_ have to cater for this yourself by adding \\\\' or $."
    '("label" TeX-arg-define-label)
    '("pageref" TeX-arg-ref)
    '("ref" TeX-arg-ref)
+   '("cref" TeX-arg-ref)
+   '("Cref" TeX-arg-ref)
    '("newcommand" TeX-arg-define-macro [ "Number of arguments" ] t)
    '("renewcommand" TeX-arg-macro [ "Number of arguments" ] t)
    '("newenvironment" TeX-arg-define-environment
-- 
Matt
_______________________________________________
auctex-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex-devel

Reply via email to