# HG changeset patch # User Uwe Brauer # Date 1699638759 -3600 # Fri Nov 10 18:52:39 2023 +0100 # Node ID bc01a2be8bc51d6231d2a4a11031b504c7684306 # Parent cb348898b1b8d380c25c990607cb066de4d4f0ef # EXP-Topic nameref Add reftex support to nameref * style/nameref.el ("nameref"): Add reftex support to nameref. diff --git a/style/nameref.el b/style/nameref.el --- a/style/nameref.el +++ b/style/nameref.el @@ -49,6 +49,20 @@ '(("\\\\\\(?:N\\|n\\)ameref\\*?{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}")) TeX-complete-list)) + (when (featurep 'reftex-vars) + + ;; Add a new reference style + (add-to-list 'reftex-ref-style-alist + '("Nameref" "nameref" (("\\nameref" ?m))) + t) + + ;; And activate it + (and LaTeX-reftex-ref-style-auto-activate + (fboundp 'reftex-ref-style-activate) + (reftex-ref-style-activate "Nameref"))) + + + ;; Fontification (when (and (fboundp 'font-latex-add-keywords) (fboundp 'font-latex-set-syntactic-keywords)