[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 794ecb01ab 35/77: Fontify \maketitle macro, (continued)
- [elpa] externals/auctex 794ecb01ab 35/77: Fontify \maketitle macro, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 0029ca410f 77/77: Release GNU AUCTeX 13.1.4, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 06db9e302b 75/77: Add new style/tcolorboxlib-theorems.el, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 19a2607b42 73/77: Unbreak building with Emacs 29 after obsoleting autoload.el, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex ec3877ea7f 74/77: Pacify Emacs 29 compiler warnings, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 0f59225c0f 70/77: ; * doc/todo.texi (Mid-term Goals): Fix typo., Tassilo Horn, 2022/08/26
- [elpa] externals/auctex fe15af59d0 76/77: Merge remote-tracking branch 'origin/master' into externals/auctex, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 4486056d50 16/77: Add new style/ltcaption.el, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 3a1a820bdf 18/77: ; Rearrange code after last commit., Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 9b5cf4b550 27/77: Fix insertion of second optional argument, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 4770d57dba 38/77: Support different number of arguments for \hyperref,
Tassilo Horn <=
- [elpa] externals/auctex e3657144f5 53/77: Partial fix of region preview with TeX-output-dir feature, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex edabf207b4 65/77: Insert a space between \caption and \\ in tables, 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 728db25bf7 69/77: Update documentation, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex f2138e9a74 33/77: New option for saving auto parsed information (bug#55511), Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 5c5aa78de0 71/77: Fix doc string, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex c39fe6d1d6 13/77: Delete compatibility code, Tassilo Horn, 2022/08/26
- [elpa] externals/auctex 39e0062235 46/77: Introduce face and keyword class for underlined text, Tassilo Horn, 2022/08/26