monnier pushed a commit to branch externals/auctex
in repository elpa.
commit f83c9ac5b98a452f986ff5db978f0114ef721897
Author: Tassilo Horn <[email protected]>
Date: Wed Feb 13 19:08:52 2013 +0000
* Makefile.in (STYLESRC): Activate new style nameref.el.
* doc/auctex.texi (Adding Macros): Mention that `TeX-arg-savebox'
now supports completion.
* style/nameref.el: New style.
* style/hyperref.el ("hyperref"): Run nameref style hook because
hyperref activates nameref.
---
ChangeLog | 14 ++++++++++++++
Makefile.in | 2 +-
doc/auctex.texi | 2 +-
style/hyperref.el | 8 +++++---
style/nameref.el | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 72 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0eeb768..8db5f48 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2013-02-13 Tassilo Horn <[email protected]>
+
+ * Makefile.in (STYLESRC): Activate new style nameref.el.
+
+2013-02-13 Mads Jensen <[email protected]>
+
+ * doc/auctex.texi (Adding Macros): Mention that `TeX-arg-savebox'
+ now supports completion.
+
+ * style/nameref.el: New style.
+
+ * style/hyperref.el ("hyperref"): Run nameref style hook because
+ hyperref activates nameref.
+
2013-02-10 Mos� Giordano <[email protected]>
* style/siunitx.el ("siunitx-unit"): New type for the parser.
diff --git a/Makefile.in b/Makefile.in
index ce0333b..efe03d1 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -128,7 +128,7 @@ STYLESRC = style/prosper.el \
style/lscape.el style/epigraph.el style/mflogo.el \
style/multirow.el style/imakeidx.el style/afterpage.el \
style/longtable.el style/lipsum.el style/kantlipsum.el \
- style/memoir.el style/placeins.el
+ style/memoir.el style/placeins.el style/nameref.el
STYLEELC = $(STYLESRC:.el=.elc)
CLEANFILES = $(AUCELC) $(STYLEELC) $(MULEELC)
diff --git a/doc/auctex.texi b/doc/auctex.texi
index 56dd389..d16b611 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -3934,7 +3934,7 @@ Prompt for a Bib@TeX{} citation.
Prompt for a @LaTeX{} counter completing with known counters.
@item TeX-arg-savebox
-Prompt for a @LaTeX{} savebox.
+Prompt for a @LaTeX{} savebox completing with known saveboxes.
@item TeX-arg-file
Prompt for a filename in the current directory, and use it without the
diff --git a/style/hyperref.el b/style/hyperref.el
index d4a7117..5a6cb98 100644
--- a/style/hyperref.el
+++ b/style/hyperref.el
@@ -1,6 +1,6 @@
;;; hyperref.el --- AUCTeX style for `hyperref.sty' v6.83m
-;; Copyright (C) 2008 Free Software Foundation, Inc.
+;; Copyright (C) 2008, 2013 Free Software Foundation, Inc.
;; Author: Ralf Angeli <[email protected]>
;; Maintainer: [email protected]
@@ -156,8 +156,10 @@
(TeX-add-style-hook
"hyperref"
(lambda ()
- ;; hyperref.sty loads url.sty
- (TeX-run-style-hooks "url")
+ ;; hyperref loads nameref and url (+ some other packages which do not have
+ ;; style hooks)
+ (TeX-run-style-hooks "url" "nameref")
+
(TeX-add-symbols
'("hypersetup" (TeX-arg-key-val LaTeX-hyperref-package-options))
'("href" [ (TeX-arg-key-val LaTeX-hyperref-href-options) ] "URL" "Text")
diff --git a/style/nameref.el b/style/nameref.el
new file mode 100644
index 0000000..ff8e90a
--- /dev/null
+++ b/style/nameref.el
@@ -0,0 +1,51 @@
+;;; nameref.el --- AUCTeX style for `nameref.sty'
+
+;; Copyright (C) 2013 Free Software Foundation, Inc.
+
+;; Author: Mads Jensen <[email protected]>
+;; Maintainer: [email protected]
+;; Keywords: tex
+
+;; This file is part of AUCTeX.
+
+;; AUCTeX is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; AUCTeX is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with AUCTeX; see the file COPYING. If not, write to the Free
+;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301, USA.
+
+;;; Commentary:
+
+;; This file adds support for `nameref.sty'
+
+;;; Code:
+
+(TeX-add-style-hook
+ "nameref"
+ (lambda ()
+ (TeX-add-symbols
+ '("nameref" TeX-arg-label))
+
+ (setq TeX-complete-list
+ (append '(("\\\\nameref{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}"))
+ TeX-complete-list))
+
+ ;, Fontification
+ (when (and (fboundp 'font-latex-add-keywords)
+ (fboundp 'font-latex-set-syntactic-keywords)
+ (eq TeX-install-font-lock 'font-latex-setup))
+ (font-latex-add-keywords '(("nameref" "{")) 'reference))))
+
+(defvar LaTeX-nameref-package-options nil
+ "Package options for nameref.")
+
+;; nameref.el ends here