branch: externals/auctex
commit 2e6846e148589fe4841d342bf0f07e5753ab720c
Author: Arash Esbati <[email protected]>
Commit: Arash Esbati <[email protected]>
Check the options and load the style backref.el
* style/hyperref.el ("hyperref"): Run the style hook for
backref.el when the corresponding option is given.
Correct link to testform.tex.
---
style/hyperref.el | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/style/hyperref.el b/style/hyperref.el
index 21b9d1d..b5a0f24 100644
--- a/style/hyperref.el
+++ b/style/hyperref.el
@@ -1,6 +1,6 @@
;;; hyperref.el --- AUCTeX style for `hyperref.sty' v6.83m -*-
lexical-binding: t; -*-
-;; Copyright (C) 2008, 2013-2020 Free Software Foundation, Inc.
+;; Copyright (C) 2008, 2013-2021 Free Software Foundation, Inc.
;; Author: Ralf Angeli <[email protected]>
;; Maintainer: [email protected]
@@ -259,7 +259,7 @@
'("Acrobatmenu" "Menu option" "Text")
;; The next 6 macros take Key-vals defined in
;; "LaTeX-hyperref-forms-options". For an example, see
- ;; http://mirrors.ctan.org/macros/latex/contrib/hyperref/test/testform.tex
+ ;; https://github.com/latex3/hyperref/blob/main/test/testform.tex
'("TextField" [ (TeX-arg-key-val LaTeX-hyperref-forms-options) ] "Label")
'("CheckBox" [ (TeX-arg-key-val LaTeX-hyperref-forms-options) ] "Label")
'("ChoiceMenu" [ (TeX-arg-key-val LaTeX-hyperref-forms-options) ] "Label"
"Choices")
@@ -325,6 +325,17 @@
(not (eq TeX-engine 'xetex)))
(setq TeX-PDF-from-DVI "Dvipdfmx"))
+ ;; Loop over the possible options and load backref.el:
+ (let ((opts '("backref"
+ "backref=section"
+ "backref=slide"
+ "backref=page"
+ "pagebackref"
+ "pagebackref=true")))
+ (dolist (opt opts)
+ (when (LaTeX-provided-package-options-member "hyperref" opt)
+ (TeX-run-style-hooks "backref"))))
+
;; Activate RefTeX reference style.
(and LaTeX-reftex-ref-style-auto-activate
(fboundp 'reftex-ref-style-activate)