auctex-devel
[Top][All Lists]
Advanced

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

[AUCTeX-devel] Simple patch to add cref support


From: Matthew Leach
Subject: [AUCTeX-devel] Simple patch to add cref support
Date: Sat, 11 Oct 2014 21:08:09 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

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  <address@hidden>

        * 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

reply via email to

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