branch: master commit 7fca4a201637b1f3ca8fb127b55296853dbd1f83 Author: Arash Esbati <ar...@gnu.org> Commit: Arash Esbati <ar...@gnu.org>
Update style/acro.el to package v3.8 * style/acro.el (LaTeX-acro-acsetup-key-val-options) (LaTeX-acro-declareacronym-key-val-options) (LaTeX-acro-printacronyms-key-val-options) (LaTeX-acro-ac-key-val-options): New variables. (LaTeX-acro-cleanup): Delete the conditional for the "macros" package option which isn't provided by package v3.8. (LaTeX-arg-acro-key-val): Delete function and use `TeX-arg-key-val' instead. ("acro"): Adjust macros and fontification to package v3.8. Use 'reference' style fontification for acronym macros. (LaTeX-acro-package-options-list): Update to options of v3.8. --- style/acro.el | 905 ++++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 721 insertions(+), 184 deletions(-) diff --git a/style/acro.el b/style/acro.el index 26e32b8d..f558db11 100644 --- a/style/acro.el +++ b/style/acro.el @@ -1,6 +1,6 @@ -;;; acro.el --- AUCTeX style for `acro.sty' version 1.2a. -*- lexical-binding: t; -*- +;;; acro.el --- AUCTeX style for `acro.sty' version v3.8 -*- lexical-binding: t; -*- -;; Copyright (C) 2013-2015, 2018, 2020 Free Software Foundation, Inc. +;; Copyright (C) 2013-2024 Free Software Foundation, Inc. ;; Maintainer: auctex-devel@gnu.org ;; Author: Mosè Giordano <giordano.m...@libero.it> @@ -25,7 +25,7 @@ ;;; Commentary: -;; This file adds support for `acro.sty' version 1.2a. +;; This file adds support for `acro.sty' version v3.8. ;;; Code: @@ -37,51 +37,203 @@ "font-latex" (keywords class)) -(defvar LaTeX-acro-package-options-list - '(;; General Options - ("version" ("0" "1")) +(defvar LaTeX-acro-acsetup-key-val-options + '(("case-sensitive" ("true" "false")) + ("case-insensitive" ("true" "false")) + ;; 6.1. Basic properties + ("use-id-as-short" ("true" "false")) + ;; 9. The first or full appearance + ("first-style" ("long-short" "short-long" "short" "long" "footnote")) + ("subsequent-style" ("long-short" "short-long" "short" "long" "footnote")) + ;; 10. Single appearances of an acronym ("single" ("true" "false")) - ("hyperref" ("true" "false")) - ("record-pages" ("true" "false")) - ("only-used" ("true" "false")) - ("mark-as-used" ("first" "any")) - ("macros" ("true" "false")) - ("xspace" ("true" "false")) - ("strict" ("true" "false")) - ("sort" ("true" "false")) - ("cite" ("all" "first" "none")) - ("cite-cmd") - ("cite-space") + ("single-style" ("long-short" "short-long" "short" "long" "footnote")) + ;; 11.1. The main command and its options + ("list/template" ("description" "tabular" "longtable" + "supertabular" "tabularray")) + ("list/display" ("all" "used")) + ("list/include") + ("list/exclude") + ("list/add" ("true" "false")) + ("list/heading" ("none" "section" "section*" "chapter" "chapter*")) + ("list/name") + ("list/preamble") + ("list/locale/display" ("true" "false")) + ;; 11.2. Add page numbers to the list + ("pages/display" ("first" "all" "none")) + ("pages/seq/use" ("true" "false")) + ("pages/seq/pre") + ("pages/seq/threshold") + ("pages/fill") + ("pages/name" ("true" "false")) + ;; 11.3. Filter lists using tags + ("list/exclude") + ("list/include") + ;; 11.4. Local lists + ("barriers/use" ("true" "false")) + ("list/local" ("true" "false")) + ;; 12. Formatting + ("format") + ("format/short") + ("format/long") + ("format/first-long") + ("format/alt") + ("format/extra") + ("format/foreign") + ("format/list") + ("format/replace" ("true" "false")) + ("short-plural-ending") + ("long-plural-ending") + ;; 15. Foreign language acronyms + ("foreign/display" ("true" "false")) + ("list/foreign/display" ("true" "false")) + ("locale/display" ("true" "false")) + ("list/locale/display" ("true" "false")) + ("locale/format") + ;; 16. Uppercasing + ("uppercase/first") + ("uppercase/title") + ("uppercase/all") + ("uppercase/none") + ("uppercase/cmd") + ("uppercase/short" ("true" "false")) + ;; 17.1. Citing + ("cite/cmd") + ("cite/group" ("true" "false")) + ("cite/display" ("first" "all" "none")) + ("cite/pre") + ("cite/group/cmd") + ("cite/group/pre") + ;; 17.2. Indexing + ("index/use" ("true" "false" "indexed")) + ("index/cmd") + ("index/disable") + ("index/clear") + ;; 18. Barriers + ("barriers/use" ("true" "false")) + ("barriers/reset" ("true" "false")) + ("barriers/single" ("true" "false")) + ;; 19. Trailing tokens + ("trailing/define") + ("trailing/activate") + ("trailing/deactivate") + ;; 21.1. Backlinks + ("make-links" ("true" "false")) + ("link-only-first" ("true" "false")) + ;; 21.3. pdf comments + ("pdfcomments/use" ("true" "false")) + ("pdfcomments/cmd") + ;; 21.4. Accessibility support + ("accsupp/use" ("true" "false")) + ("accsupp/options") + ("accsupp/method") + ;; 22. Localisation + ("language" ("auto")) + ;; 23. Patches + ("patch/floats" ("true" "false")) + ("patch/lists" ("true" "false")) + ("patch/tabularx" ("true" "false")) + ("patch/longtable" ("true" "false")) + ("patch/ltxtable" ("true" "false")) + ("patch/tabu" ("true" "false")) + ("patch/caption" ("true" "false")) + ("patch/maketitle" ("true" "false"))) + "AList of key=vals for the \\acsetup macro from the acro package.") + +(defvar LaTeX-acro-declareacronym-key-val-options + '(("case-sensitive" ("true" "false")) + ("case-insensitive" ("true" "false")) + ;; 6.1. Basic properties + ("short") + ("use-id-as-short" ("true" "false")) + ("long") + ("alt") + ("extra") + ("foreign") + ("long-post") + ("post") + ("single") + ("sort") + ("tag") + ("cite") + ("before-citation") + ("index") + ("index-sort") ("index-cmd") - ("accsupp" ("true" "false")) - ("uc-cmd") - ;; Options Regarding Acronyms + ;; 6.2. Properties related to plural and indefinite forms + ("short-plural") + ("short-plural-form") + ("long-plural") + ("long-plural-form") + ("alt-plural") + ("alt-plural-form") + ("foreign-plural") + ("foreign-plural-form") + ("short-indefinite") + ("long-indefinite") + ("alt-indefinite") + ;; 6.3. Properties related to formatting + ("format") ("short-format") ("long-format") ("first-long-format") - ("list-short-format") - ("list-long-format") + ("alt-format") ("extra-format") - ("first-style" ("default" "plain" "empty" "square" "short" "reversed" - "plain-reversed" "footnote" "sidenote")) - ("extra-style" ("default" "plain" "comma" "paren" "bracket")) - ("plural-ending") - ;; Options Regarding the List - ("page-ref" ("none" "plain" "comma" "paren")) - ("page-name") - ("pages-name") - ("page-ranges" ("true" "false")) - ("next-page") - ("next-pages") - ("list-type" ("table" "itemize" "description")) - ("list-style" ("list" "tabular" "longtable" "extra-tabular" "extra-longtable" - "extra-tabular-rev" "extra-longtable-rev")) - ("list-header" ("chapter" "chapter*" "section" "section*" "subsection" - "subsection*" "addchap" "addsec")) - ("list-name") - ("list-table-width") - ("list-caps" ("true" "false"))) - "Package options for the acro package.") + ("foreign-format") + ("list-format") + ("first-style" ("long-short" "short-long" "short" "long" "footnote")) + ("subsequent-style" ("long-short" "short-long" "short" "long" "footnote")) + ("single-style" ("long-short" "short-long" "short" "long" "footnote")) + ;; 6.4. Properties related to the created pdf file + ("pdfstring") + ("pdfcomment") + ("short-acc") + ("long-acc") + ("alt-acc") + ("foreign-acc") + ("extra-acc") + ("single-acc") + ("list-acc") + ;; 6.5. Further properties + ("list") + ("foreign-babel") + ("foreign-locale") + ("preset") + ("uselist")) + "AList of key=vals for the \\DeclareAcronym macro from the acro package. +These are used for the second mandatory argument.") + +(defvar LaTeX-acro-printacronyms-key-val-options + '(;; 11.1. The main command and its options + ("template" ("description" "tabular" "longtable" "supertabular" "tabularray")) + ("sort" ("true" "false")) + ("display" ("all" "used")) + ("include") + ("exclude") + ("add" ("true" "false")) + ("heading" ("none" "section" "section*" "chapter" "chapter*")) + ("name") + ("preamble") + ("display" ("true" "false")) + ;; 11.2. Add page numbers to the list + ("pages") + ;; 11.4. Local lists + ("barriers") + ("local" ("true" "false"))) + "AList of key=vals for the \\printacronyms macro from the acro package. +These are used in its optional argument.") + +(defvar LaTeX-acro-ac-key-val-options + '(("case-sensitive" ("true" "false")) + ("case-insensitive" ("true" "false")) + ("use-id-as-short" ("true" "false")) + ;; 9. The first or full appearance + ("first-style" ("long-short" "short-long" "short" "long" "footnote")) + ("subsequent-style" ("long-short" "short-long" "short" "long" "footnote")) + ;; 10. Single appearances of an acronym + ("single" ("true" "false")) + ("single-style" ("long-short" "short-long" "short" "long" "footnote"))) + "AList of key=vals for the various \\acX macros from the acro package.") (TeX-auto-add-type "acro-acronym" "LaTeX") @@ -98,15 +250,10 @@ (setq LaTeX-auto-acro-acronym nil)) (defun LaTeX-acro-cleanup () - "Move acronyms from `LaTeX-auto-acro-acronym' to -`LaTeX-acro-list' and to `TeX-auto-symbol' if option `macros' is -set to `true'." + "Move acronyms from `LaTeX-auto-acro-acronym' to `LaTeX-acro-acronym-list'." (mapc (lambda (acronym) (add-to-list 'LaTeX-acro-acronym-list (list acronym))) - LaTeX-auto-acro-acronym) - (when (or (LaTeX-provided-package-options-member "acro" "macros") - (LaTeX-provided-package-options-member "acro" "macros=true")) - (add-to-list 'TeX-auto-symbol LaTeX-auto-acro-acronym))) + LaTeX-auto-acro-acronym)) (add-hook 'TeX-auto-prepare-hook #'LaTeX-acro-prepare t) (add-hook 'TeX-auto-cleanup-hook #'LaTeX-acro-cleanup t) @@ -124,7 +271,7 @@ list of defined acronyms." (let ((acronym (completing-read (TeX-argument-prompt optional prompt "Acronym") (LaTeX-acro-acronym-list) nil nil nil 'LaTeX-acro-acronym-history))) - (if (and definition (not (string-equal "" acronym))) + (if (and definition (not (string-empty-p acronym))) (LaTeX-add-acro-acronyms acronym)) (TeX-argument-insert acronym optional optional))) @@ -135,163 +282,553 @@ argument, otherwise as a mandatory one. Use PROMPT as the prompt string." (LaTeX-arg-acro-acronym optional prompt t)) -(defvar LaTeX-acro-declareacronym-keys - '(("short") ("long") ("short-plural") ("long-plural") ("long-plural-form") - ("short-indefinite") ("long-indefinite") ("long-pre") ("long-post") ("alt") - ("alt-indefinite") ("extra") ("sort") ("class") ("cite") ("short-format") - ("long-format") ("first-long-format") ("pdfstring") ("accsupp") - ("index-sort") ("index") ("index-cmd")) - "List of keys accepted by `\\DeclareAcronym' macro of `acro' package -in its second mandatory argument.") - -(defvar LaTeX-acro-printacronyms-keys - '(("include-classes") ("exclude-classes") ("name") ("header")) - "List of keys accepted by `\\printacronyms' macro of `acro' package -in its optional argument.") - -(defun LaTeX-arg-acro-key-val (optional prompt key-val-alist) - "Prompt for keys and values in KEY-VAL-ALIST. -<SPC> key binding in minibuffer is removed temporarily. Insert -the given value as a TeX macro argument. - -See `TeX-read-key-val' for explanation of OPTIONAL, PROMPT and -KEY-VAL-ALIST." - ;; Remove <SPC> key binding from map used in `multi-prompt-key-value' (called - ;; by `TeX-arg-key-val') with `require-match' set to `nil'. - (let ((crm-local-completion-map - (remove (assoc 32 crm-local-completion-map) crm-local-completion-map))) - (TeX-arg-key-val optional key-val-alist prompt))) - (TeX-add-style-hook "acro" (lambda () (TeX-auto-add-regexp `(,LaTeX-acro-regexp 1 LaTeX-auto-acro-acronym)) + (TeX-add-symbols - ;; Creating New Acronyms + + ;; 5.2. Setup command + '("acsetup" + (TeX-arg-key-val LaTeX-acro-acsetup-key-val-options)) + + ;; 6. Declaring acronyms and other abbreviations '("DeclareAcronym" LaTeX-arg-define-acro-acronym - (LaTeX-arg-acro-key-val "Definition of acronym (k=v)" - LaTeX-acro-declareacronym-keys)) - ;; Using the Acronyms - '("ac" LaTeX-arg-acro-acronym) - '("ac*" LaTeX-arg-acro-acronym) - '("Ac" LaTeX-arg-acro-acronym) - '("Ac*" LaTeX-arg-acro-acronym) - '("acs" LaTeX-arg-acro-acronym) - '("acs*" LaTeX-arg-acro-acronym) - '("acl" LaTeX-arg-acro-acronym) - '("acl*" LaTeX-arg-acro-acronym) - '("Acl" LaTeX-arg-acro-acronym) - '("Acl*" LaTeX-arg-acro-acronym) - '("aca" LaTeX-arg-acro-acronym) - '("aca*" LaTeX-arg-acro-acronym) - '("acf" LaTeX-arg-acro-acronym) - '("acf*" LaTeX-arg-acro-acronym) - '("Acf" LaTeX-arg-acro-acronym) - '("Acf*" LaTeX-arg-acro-acronym) - '("acp" LaTeX-arg-acro-acronym) - '("acp*" LaTeX-arg-acro-acronym) - '("Acp" LaTeX-arg-acro-acronym) - '("Acp*" LaTeX-arg-acro-acronym) - '("acsp" LaTeX-arg-acro-acronym) - '("acsp*" LaTeX-arg-acro-acronym) - '("aclp" LaTeX-arg-acro-acronym) - '("aclp*" LaTeX-arg-acro-acronym) - '("Aclp" LaTeX-arg-acro-acronym) - '("Aclp*" LaTeX-arg-acro-acronym) - '("acap" LaTeX-arg-acro-acronym) - '("acap*" LaTeX-arg-acro-acronym) - '("acfp" LaTeX-arg-acro-acronym) - '("acfp*" LaTeX-arg-acro-acronym) - '("Acfp" LaTeX-arg-acro-acronym) - '("Acfp*" LaTeX-arg-acro-acronym) - ;; Indefinite Forms - '("iac" LaTeX-arg-acro-acronym) - '("iac*" LaTeX-arg-acro-acronym) - '("Iac" LaTeX-arg-acro-acronym) - '("Iac*" LaTeX-arg-acro-acronym) - '("iacs" LaTeX-arg-acro-acronym) - '("iacs*" LaTeX-arg-acro-acronym) - '("Iacs" LaTeX-arg-acro-acronym) - '("Iacs*" LaTeX-arg-acro-acronym) - '("iaca" LaTeX-arg-acro-acronym) - '("iaca*" LaTeX-arg-acro-acronym) - '("Iaca" LaTeX-arg-acro-acronym) - '("Iaca*" LaTeX-arg-acro-acronym) - '("iacl" LaTeX-arg-acro-acronym) - '("iacl*" LaTeX-arg-acro-acronym) - '("Iacl" LaTeX-arg-acro-acronym) - '("Iacl*" LaTeX-arg-acro-acronym) - '("iacf" LaTeX-arg-acro-acronym) - '("iacf*" LaTeX-arg-acro-acronym) - '("Iacf" LaTeX-arg-acro-acronym) - '("Iacf*" LaTeX-arg-acro-acronym) - '("iacflike" LaTeX-arg-acro-acronym) - '("iacflike*" LaTeX-arg-acro-acronym) - '("Iacflike" LaTeX-arg-acro-acronym) - '("Iacflike*" LaTeX-arg-acro-acronym) + (TeX-arg-key-val LaTeX-acro-declareacronym-key-val-options + "List of properties" + nil ?\s)) + + ;; 6.6. Presets + '("NewAcroPreset" "Set name" t) + '("RenewAcroPreset" "Set name" t) + '("DeclareAcroPreset" "Set name" t) + + ;; 7. Using acronyms + '("ac" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("ac*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("Ac" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("Ac*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("acp" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("acp*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("Acp" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("Acp*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("iac" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("iac*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("Iac" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("Iac*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + + ;; + '("acs" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("acs*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("Acs" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("Acs*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("acsp" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("acsp*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("Acsp" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("Acsp*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("iacs" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("iacs*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("Iacs" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("Iacs*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + ;; + '("acl" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("acl*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("Acl" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("Acl*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("aclp" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("aclp*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("Aclp" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("Aclp*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("iacl" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("iacl*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("Iacl" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("Iacl*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + ;; + '("aca" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("aca*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("Aca" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("Aca*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("acap" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("acap*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("Acap" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("Acap*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("iaca" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("iaca*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("Iaca" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("Iaca*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + ;; + '("acf" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("acf*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("Acf" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("Acf*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("acfp" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("acfp*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("Acfp" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("Acfp*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("iacf" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("iacf*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("Iacf" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("Iacf*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + ;; + '("iacflike" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("iacflike*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("Iacflike" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("Iacflike*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) ;; Simulating the First Appearance - '("acflike" LaTeX-arg-acro-acronym) - '("acflike*" LaTeX-arg-acro-acronym) - '("acfplike" LaTeX-arg-acro-acronym) - '("acfplike*" LaTeX-arg-acro-acronym) - ;; Reset or Mark as Used + '("acflike" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("acflike*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("acfplike" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("acfplike*" + [TeX-arg-key-val LaTeX-acro-ac-key-val-options] + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + + ;; FIXME: PDF bookmarks macros seems to be gone in v3.8; we leave + ;; these macros here in case they are still used with older + ;; versions: + '("acpdfstring" + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + '("acpdfstringplural" + (TeX-arg-completing-read (LaTeX-acro-acronym-list) + "Acronym" + nil nil nil nil nil nil nil + LaTeX-acro-acronym-history)) + + ;; 11. Printing the List + '("printacronyms" + [TeX-arg-key-val LaTeX-acro-printacronyms-key-val-options + nil nil ?\s]) + + ;; 20. Using or resetting acronyms '("acreset" "List of acronyms") '("acresetall" 0) '("acuse" "List of acronyms") '("acuseall" 0) - ;; PDF bookmarks - '("acpdfstring" LaTeX-arg-acro-acronym) - '("acpdfstringplural" LaTeX-arg-acro-acronym) - ;; Printing the List - '("printacronyms" [LaTeX-arg-acro-key-val nil LaTeX-acro-printacronyms-keys]) - ;; Customization - '("acsetup" (TeX-arg-key-val LaTeX-acro-package-options-list))) + + ;; 23. Patches + '("acswitchoff" 0) + '("acswitchon" 0) + + ;; 25.2. Defining new templates + '("NewAcroTemplate" ["Type"] "Name" t) + '("RenewAcroTemplate" ["Type"] "Name" t) + '("SetupAcroTemplate" ["Type"] "Name" t) + '("SetupNextAcroTemplate" ["Type"] "Name" t) + "AcroTemplateType" "AcroTemplateName") + + (TeX-run-style-hooks "l3sort" "xspace" "xtemplate" "l3keys2e" - "xparse" "expl3") ;; Fontification (when (and (featurep 'font-latex) (eq TeX-install-font-lock 'font-latex-setup)) - (font-latex-add-keywords '(("DeclareAcronym" "{{") - ("ac" "*{") - ("Ac" "*{") - ("acs" "*{") - ("acl" "*{") - ("Acl" "*{") - ("aca" "*{") - ("acf" "*{") - ("Acf" "*{") - ("acp" "*{") - ("Acp" "*{") - ("acsp" "*{") - ("aclp" "*{") - ("Aclp" "*{") - ("acap" "*{") - ("acfp" "*{") - ("Acfp" "*{") - ("acflike" "*{") - ("acfplike" "*{") - ("iac" "*{") - ("Iac" "*{") - ("iacs" "*{") - ("Iacs" "*{") - ("iaca" "*{") - ("Iaca" "*{") - ("iacl" "*{") - ("Iacl" "*{") - ("iacf" "*{") - ("Iacf" "*{") - ("iacflike" "*{") - ("Iacflike" "*{") - ("acuse" "{")) - 'function))) + (font-latex-add-keywords '(("acsetup" "{") + ("DeclareAcronym" "{{") + ("NewAcroPreset" "{{") + ("RenewAcroPreset" "{{") + ("DeclareAcroPreset" "{{") + ("acreset" "{") + ("acresetall" "") + ("acuse" "{") + ("acuseall" "") + ("acswitchoff" "") + ("acswitchon" "") + ("NewAcroTemplate" "[{{") + ("RenewAcroTemplate" "[{{") + ("SetupAcroTemplate" "[{{") + ("SetupNextAcroTemplate" "[{{")) + 'function) + (font-latex-add-keywords '(("ac" "*[{") + ("Ac" "*[{") + ("acp" "*[{") + ("Acp" "*[{") + ("iac" "*[{") + ("Iac" "*[{") + ;; + ("acs" "*[{") + ("Acs" "*[{") + ("acsp" "*[{") + ("Acsp" "*[{") + ("iacs" "*[{") + ("Iacs" "*[{") + ;; + ("acl" "*[{") + ("Acl" "*[{") + ("aclp" "*[{") + ("Aclp" "*[{") + ("iacl" "*[{") + ("Iacl" "*[{") + ;; + ("aca" "*[{") + ("Aca" "*[{") + ("acap" "*[{") + ("Acap" "*[{") + ("iaca" "*[{") + ("Iaca" "*[{") + ;; + ("acf" "*[{") + ("Acf" "*[{") + ("acfp" "*[{") + ("Acfp" "*[{") + ("iacf" "*[{") + ("Iacf" "*[{") + ;; + ("iacflike" "*[{") + ("Iacflike" "*[{") + ("acflike" "*[{") + ("acfplike" "*[{")) + 'reference))) TeX-dialect) +(defvar LaTeX-acro-package-options-list + '(("upgrade" ("true" "false")))) + (defun LaTeX-acro-package-options () "Prompt for package options for the acro package." (TeX-read-key-val t LaTeX-acro-package-options-list))