[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 4770d57dba 38/77: Support different number of ar
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 4770d57dba 38/77: Support different number of arguments for \hyperref |
Date: |
Fri, 26 Aug 2022 16:06:35 -0400 (EDT) |
branch: externals/auctex
commit 4770d57dbabbd8ecbb2f2a61a6ca4b7620be86f9
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>
Support different number of arguments for \hyperref
* style/hyperref.el (LaTeX-hyperref-forms-options): Remove
obsolete comment about the "borderstyle" key.
("hyperref"): Add a conditional for the "hyperref" macro to cater
for the different number of arguments. Therefore, don't add the
macro to `LaTeX-verbatim-macros-with-braces-local'. Also adjust
the fontification.
Add query for key-val options in "Form" environment. Add missing
"NoHyper" environment.
Update URL's, minor cosmetic changes to linebreaks.
---
style/hyperref.el | 49 ++++++++++++++++++++++++++++---------------------
1 file changed, 28 insertions(+), 21 deletions(-)
diff --git a/style/hyperref.el b/style/hyperref.el
index 81a0533c3f..c225359be1 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-2021 Free Software Foundation, Inc.
+;; Copyright (C) 2008, 2013-2022 Free Software Foundation, Inc.
;; Author: Ralf Angeli <angeli@caeruleus.net>
;; Maintainer: auctex-devel@gnu.org
@@ -42,7 +42,7 @@
"font-latex")
(defvar LaTeX-hyperref-package-options-list
- '(;; See https://www.tug.org/applications/hyperref/manual.html#x1-40003
+ '(;; See
https://mirrors.ctan.org/macros/latex/contrib/hyperref/doc/hyperref-doc.html#x1-110005
;; General options
("draft" ("true" "false"))
("final" ("true" "false"))
@@ -164,8 +164,7 @@
("nextactionraw"))
"Key=value options for href macro of the hyperref package.")
-;; See
https://www.tug.org/applications/hyperref/ftp/doc/manual.html#x1-220006.2
-
+;; See
https://mirrors.ctan.org/macros/latex/contrib/hyperref/doc/hyperref-doc.html#x1-600009.2
(defvar LaTeX-hyperref-forms-options
'(("accesskey")
("align" ("0" "1" "2"))
@@ -173,16 +172,12 @@
("backgroundcolor")
("bordercolor")
("bordersep")
- ("borderwidth")
- ;; "borderstyle" is not mentioned in the original hyperref-doc, it
- ;; can be seen in action in
- ;; https://github.com/latex3/hyperref/blob/main/test/testform.tex
- ;; S=Solid (default), D=Dashed, B=Beveled, I=Inset, U=Underline
("borderstyle" ("S" "D" "B" "I" "U"))
+ ("borderwidth")
("calculate")
("charsize")
- ("checkboxsymbol" ("true" "false"))
- ("checked")
+ ("checkboxsymbol")
+ ("checked" ("true" "false"))
("color")
("combo" ("true" "false"))
("default")
@@ -239,7 +234,10 @@
'("hyperbaseurl" t)
'("hyperimage" "Image URL" "Text")
'("hyperdef" "Category" "Name" "Text")
- '("hyperref" "URL" "Category" "Name" "Text")
+ '("hyperref"
+ (TeX-arg-conditional (y-or-n-p "Insert a label and text? ")
+ ([TeX-arg-ref] "Text")
+ ("URL" "Category" "Name" "Text")))
'("hyperlink" "Name" "Text")
'("hypertarget" "Name" "Text")
'("phantomsection" 0)
@@ -273,13 +271,17 @@
'("MakeCheckField" "Width" "Height")
'("MakeTextField" "Width" "Height")
'("MakeChoiceField" "Width" "Height")
- '("MakeButtonField" "Text"))
+ '("MakeButtonField" "Text")
+ ;; The macro version of the 'Form' environment:
+ '("Form" 0))
;; Form fields must be inside a "Form"-env, one per file is allowed, cf.
- ;; https://www.tug.org/applications/hyperref/ftp/doc/manual.html#x1-200006
- ;; It is up to user to insert [<options>] after \begin{Form}
+ ;;
https://mirrors.ctan.org/macros/latex/contrib/hyperref/doc/hyperref-doc.html#x1-590009.1
(LaTeX-add-environments
- '("Form"))
+ '("Form" LaTeX-env-args [TeX-arg-key-val (("action")
+ ("encoding" ("html"))
+ ("method" ("post" "get")))])
+ "NoHyper")
;; Do not indent the content of the "Form"-env; it is odd if the
;; whole document is indented. Append it to a local version of
@@ -291,13 +293,17 @@
(add-to-list 'LaTeX-verbatim-macros-with-braces-local "nolinkurl")
(add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperbaseurl")
(add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperimage")
- (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperref")
+ ;; "hyperref" macros is not added here since it takes different
+ ;; number of arguments depending on a given optional argument.
+ ;; The first mandatory argument is not necessarily a verbatim one.
+ ;; (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperref")
(add-to-list 'LaTeX-verbatim-macros-with-braces-local "href")
- ;; In hyperref package, \url macro is redefined and \url|...| can't be used,
- ;; while it's possible when only url package (required by hyperref) is
loaded
+ ;; In hyperref package, \url macro is redefined and \url|...| can't
+ ;; be used, while it's possible when only url package (required by
+ ;; hyperref) is loaded
(setq LaTeX-verbatim-macros-with-delims-local
- (remove "url" LaTeX-verbatim-macros-with-delims-local))
+ (remove "url" LaTeX-verbatim-macros-with-delims-local))
;; Fontification
(when (and (featurep 'font-latex)
@@ -307,7 +313,8 @@
("hyperbaseurl" "{")
("hyperimage" "{{")
("hyperdef" "{{{")
- ("hyperref" "{{{{")
+ ;; Fontify only the minimum set of args:
+ ("hyperref" "[{")
("hyperlink" "{{")
("hypertarget" "{{")
("autoref" "*{")
- [elpa] externals/auctex 33a01b6928 59/77: Extend test for filling, (continued)
- [elpa] externals/auctex 33a01b6928 59/77: Extend test for filling, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 5c5aa78de0 71/77: Fix doc string, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex cb0a1e6be1 72/77: Improve function calls to retrieve key=vals in style hooks, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 010a1e24be 01/77: Follow up the previous commit, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex c39fe6d1d6 13/77: Delete compatibility code, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex ecf8b28cda 14/77: Add new style/multibib.el, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 37e5a450a3 20/77: Complete LaTeX lengths and counters, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 9ca155cdb0 25/77: Improve fontification of kernel macros, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex d47a6e8716 29/77: Support complex \input path (bug#55511), Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 6fe2f21e96 31/77: ; Fix warnings about single quotes in docstrings, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 4770d57dba 38/77: Support different number of arguments for \hyperref,
Tassilo Horn <=
- [elpa] externals/auctex daaff30b4a 36/77: Follow elisp quoting convention, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 192f201f96 49/77: Add new style/microtype.el, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex cc70633aa6 51/77: ; * preview.el.in (preview-reference-face): Fix warning., Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 812368af6a 62/77: Update documentation about C-M-a and C-M-e, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 545129e1c3 55/77: * style/shortvrb.el: Add missing macros incl. fontification., Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 04b9a6d1f9 56/77: Improve shortvrb.sty support, Tassilo Horn, 2022/08/26