[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 724da15 17/23: Update style/thmtools.el to packa
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 724da15 17/23: Update style/thmtools.el to package version 0.72 |
Date: |
Sat, 23 Jan 2021 04:10:09 -0500 (EST) |
branch: externals/auctex
commit 724da15cc25ba95a055e697d87188a1f148bebf7
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>
Update style/thmtools.el to package version 0.72
* style/thmtools.el (LaTeX-arg-thmtools-declaretheorem): Query for
the optional argument after the mandatory environment name.
(LaTeX-thmtools-env-label): Use `read-char-choice' instead of
`read-char'.
Set `help-form' in the let-binding.
(LaTeX-thmtools-listoftheorems-key-val): Update key=val's.
("thmtools"): Fontify also the optional argument after the
mandatory one. Keep the old behavior for compatibility.
---
style/thmtools.el | 38 +++++++++++++++++++++++---------------
1 file changed, 23 insertions(+), 15 deletions(-)
diff --git a/style/thmtools.el b/style/thmtools.el
index a4a33b4..f4be618 100644
--- a/style/thmtools.el
+++ b/style/thmtools.el
@@ -1,6 +1,6 @@
-;;; thmtools.el --- AUCTeX style for `thmtools.sty' (v67) -*-
lexical-binding: t; -*-
+;;; thmtools.el --- AUCTeX style for `thmtools.sty' (v0.72) -*-
lexical-binding: t; -*-
-;; Copyright (C) 2018--2020 Free Software Foundation, Inc.
+;; Copyright (C) 2018--2021 Free Software Foundation, Inc.
;; Author: Arash Esbati <arash@gnu.org>
;; Maintainer: auctex-devel@gnu.org
@@ -26,7 +26,7 @@
;;; Commentary:
-;; This file adds support for `thmtools.sty' (v67) from 2019/07/31.
+;; This file adds support for `thmtools.sty' (v0.72) from 2020/08/01.
;; `thmtools.sty' is part of TeXLive.
;;; Code:
@@ -169,15 +169,15 @@ minibuffer. PROMPT replaces the standard one."
If OPTIONAL is non-nil, also insert the second argument in square
brackets. PROMPT replaces the standard one for the second
argument."
+ (let ((env (TeX-read-string
+ (TeX-argument-prompt optional prompt "Environment"))))
+ (LaTeX-add-environments `(,env LaTeX-thmtools-env-label))
+ (TeX-argument-insert env optional))
(let ((TeX-arg-opening-brace "[")
(TeX-arg-closing-brace "]"))
(TeX-argument-insert
(LaTeX-thmtools-declaretheorem-key-val t)
- t))
- (let ((env (TeX-read-string
- (TeX-argument-prompt optional prompt "Environment"))))
- (LaTeX-add-environments `(,env LaTeX-thmtools-env-label))
- (TeX-argument-insert env optional)))
+ t)))
(defun LaTeX-thmtools-listoftheorems-key-val (optional &optional prompt)
"Query and return a key=val string for \\listoftheorems macro.
@@ -199,13 +199,14 @@ minibuffer. PROMPT replaces the standard one."
(mapcar #'car (LaTeX-thmtools-declaretheorem-list)))))
(TeX-read-key-val
optional
- `(("numwidth" ,lengths)
+ `(("title")
("ignore" ,thms)
- ("onlynamed" ,thms)
- ("show" ,thms)
("ignoreall" ("true" "false"))
+ ("show" ,thms)
("showall" ("true" "false"))
- ("title"))
+ ("onlynamed" ,thms)
+ ("swapnumber" ("true" "false"))
+ ("numwidth" ,lengths))
prompt)))
(defun LaTeX-arg-thmtools-listoftheorems (optional &optional prompt)
@@ -230,8 +231,15 @@ RefTeX users should customize or add ENVIRONMENT to
(add-to-list \\='reftex-label-alist
\\='(\"theorem\" ?m \"thm:\" \"~\\ref{%s}\"
nil (\"Theorem\" \"theorem\") nil))"
- (let* ((choice (read-char
- (TeX-argument-prompt nil nil "Heading (h), Key=val (k),
Empty (RET)")))
+ (let* ((help-form "\
+Select the content of the optional argument with a key:
+`h' in order to insert a plain heading,
+`k' in order to insert key=value pairs with completion,
+RET in order to leave it empty.")
+ (choice (read-char-choice
+ (TeX-argument-prompt
+ nil nil "Heading (h), Key=val (k), Empty (RET)")
+ '(?h ?k)))
(opthead (cond ((= choice ?h)
(TeX-read-string
(TeX-argument-prompt t nil "Heading")))
@@ -291,7 +299,7 @@ RefTeX users should customize or add ENVIRONMENT to
(when (and (featurep 'font-latex)
(eq TeX-install-font-lock 'font-latex-setup))
(font-latex-add-keywords '(("declaretheoremstyle" "[{")
- ("declaretheorem" "[{")
+ ("declaretheorem" "[{[")
("listoftheorems" "[")
("ignoretheorems" "{"))
'function)))
- [elpa] externals/auctex 46c356b 18/23: Update style/multirow.el to package version 2.6, (continued)
- [elpa] externals/auctex 46c356b 18/23: Update style/multirow.el to package version 2.6, Tassilo Horn, 2021/01/23
- [elpa] externals/auctex 3f38eb2 07/23: Support page(box) options for dvipdfmx in graphicx.el, Tassilo Horn, 2021/01/23
- [elpa] externals/auctex a1569ca 12/23: Fix use-package recipe in install docs (once again), Tassilo Horn, 2021/01/23
- [elpa] externals/auctex 74f5675 01/23: Adapt preview.el.in for `TeX-translate-location-hook', Tassilo Horn, 2021/01/23
- [elpa] externals/auctex 2c5c2e1 10/23: Add support for some missing kernel macros, Tassilo Horn, 2021/01/23
- [elpa] externals/auctex ba0b1af 21/23: Prevent inadvertent destruction of list variable, Tassilo Horn, 2021/01/23
- [elpa] externals/auctex 18af0a5 13/23: * style/extramarks.el ("extramarks"): Use reference keyword class., Tassilo Horn, 2021/01/23
- [elpa] externals/auctex 8aa5381 14/23: Delete kernel commands from styles, Tassilo Horn, 2021/01/23
- [elpa] externals/auctex 4a114d1 15/23: Fix adding duplicates to TeX-auto-regexp-list, Tassilo Horn, 2021/01/23
- [elpa] externals/auctex 11d8029 16/23: Signal an error if auto-parser regexp has too many groups, Tassilo Horn, 2021/01/23
- [elpa] externals/auctex 724da15 17/23: Update style/thmtools.el to package version 0.72,
Tassilo Horn <=
- [elpa] externals/auctex 931dacf 20/23: ; * style/bigstrut.el: Silence the compiler., Tassilo Horn, 2021/01/23
- [elpa] externals/auctex 696400c 22/23: Merge remote-tracking branch 'origin/master' into externals/auctex, Tassilo Horn, 2021/01/23
- [elpa] externals/auctex 8585c4d 19/23: Update style/bigstrut.el to package version 2.6, Tassilo Horn, 2021/01/23
- [elpa] externals/auctex 7b07019 23/23: Regenerate docs, Tassilo Horn, 2021/01/23