AUCTeX Sync -- Updated Style Files.
[packages] / xemacs-packages / auctex / style / varioref.el
index 8811391..1d87507 100644 (file)
@@ -1,6 +1,6 @@
 ;;; varioref.el --- AUCTeX style file with support for varioref.sty
 
-;; Copyright (C) 1999, 2013 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2013, 2015 Free Software Foundation, Inc.
 
 ;; Author: Carsten Dominik <dominik@strw.leidenuniv.nl>
 ;;         Mads Jensen <mje@inducks.org>
               ("\\\\fullref{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}")
               ("\\\\vpageref\\*?\\(\\[[^]]*\\]\\)*{\\([^{}\n\r\\%,]*\\)"
               2 LaTeX-label-list "}"))
-           TeX-complete-list)))
+           TeX-complete-list))
+
+     ;; Fontification
+     (when (and (fboundp 'font-latex-add-keywords)
+               (eq TeX-install-font-lock 'font-latex-setup))
+       (font-latex-add-keywords '(;; vref is already in font-latex.el,
+                                 ;; so don't add it here again
+                                 ("Vref"          "*{")
+                                 ("vpageref"      "*[[{")
+                                 ("vrefrange"     "*[{{")
+                                 ("Ref"           "{")
+                                 ("fullref"       "{")
+                                 ("vpagerefrange" "*[{{"))
+                               'reference))
+
+     ;; Activate RefTeX reference style.
+     (and LaTeX-reftex-ref-style-auto-activate
+         (fboundp 'reftex-ref-style-activate)
+         (reftex-ref-style-activate "Varioref")))
    LaTeX-dialect)
 
 (defvar LaTeX-varioref-package-options