Hi all,

the following patch adds two missing commands `\nameref*' and `\Nameref'
to `nameref.el'.

Any comments welcome.

Best, Arash

>From fb3a70fcdabe825742e74bf48bf97e94730da422 Mon Sep 17 00:00:00 2001
From: Arash Esbati <a.esb...@elumatec.net>
Date: Tue, 21 Jul 2015 22:18:47 +0200
Subject: [PATCH 2/2] Add missing commands `\nameref*' and `\Nameref'.

* style/nameref.el ("nameref"): Add missing commands `\nameref*'
and `\Nameref'.
---
 ChangeLog        |  3 +++
 style/nameref.el | 19 ++++++++++++-------
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5265019..8ff7097 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2015-07-21  Arash Esbati  <esb...@gmx.de>
 
+	* style/nameref.el ("nameref"): Add missing commands `\nameref*'
+	and `\Nameref'.
+
 	* style/textpos.el ("textpos"): Fix the name of the provided env's
 	which is `textblock' and not `textpos'.
 
diff --git a/style/nameref.el b/style/nameref.el
index d09ddbe..49e7202 100644
--- a/style/nameref.el
+++ b/style/nameref.el
@@ -1,6 +1,6 @@
 ;;; nameref.el --- AUCTeX style for `nameref.sty'
 
-;; Copyright (C) 2013 Free Software Foundation, Inc.
+;; Copyright (C) 2013, 2015 Free Software Foundation, Inc.
 
 ;; Author: Mads Jensen <m...@inducks.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -33,17 +33,22 @@
  "nameref"
  (lambda ()
    (TeX-add-symbols
-    '("nameref" TeX-arg-ref))
-   
+    '("nameref" TeX-arg-ref)
+    '("nameref*" TeX-arg-ref)
+    '("Nameref" TeX-arg-ref))
+
    (setq TeX-complete-list
-         (append '(("\\\\nameref{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}"))
-                 TeX-complete-list))
-   
+	 (append
+	  '(("\\\\\\(?:N\\|n\\)ameref\\*?{\\([^{}\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)))
+     (font-latex-add-keywords '(("nameref" "*{")
+				("Nameref" "{"))
+			      'reference)))
  LaTeX-dialect)
 
 (defvar LaTeX-nameref-package-options nil
-- 
2.4.5

_______________________________________________
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel

Reply via email to