auctex-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 724da15cc25ba95a055e6


From: Arash Esbati
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 724da15cc25ba95a055e697d87188a1f148bebf7
Date: Tue, 19 Jan 2021 12:50:33 -0500 (EST)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
       via  724da15cc25ba95a055e697d87188a1f148bebf7 (commit)
      from  11d802916f54c3c52fae4d7f0ed02857661e7f9c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 724da15cc25ba95a055e697d87188a1f148bebf7
Author: Arash Esbati <arash@gnu.org>
Date:   Tue Jan 19 18:41:14 2021 +0100

    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.

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)))

-----------------------------------------------------------------------

Summary of changes:
 style/thmtools.el | 38 +++++++++++++++++++++++---------------
 1 file changed, 23 insertions(+), 15 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

[Prev in Thread] Current Thread [Next in Thread]