[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] GNU AUCTeX branch, lexical-binding-attempt-1, updated. ae
From: |
Arash Esbati |
Subject: |
[AUCTeX-diffs] GNU AUCTeX branch, lexical-binding-attempt-1, updated. ae5d08232bb309ccc8653869d652f1eabe94be76 |
Date: |
Sun, 4 Oct 2020 08:38:28 -0400 (EDT) |
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, lexical-binding-attempt-1 has been updated
via ae5d08232bb309ccc8653869d652f1eabe94be76 (commit)
from bdcf4d954e9b09575facec065243c005012318c4 (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 ae5d08232bb309ccc8653869d652f1eabe94be76
Author: Arash Esbati <arash@gnu.org>
Date: Sun Oct 4 14:37:34 2020 +0200
Improve style/amsthm.el
* style/amsthm.el (LaTeX-amsthm-theoremstyle-list): Delete
variable.
(LaTeX-arg-amsthm-fontdecl): Adjust `prompt' in
`TeX-argument-prompt' and don't use the 5. argument of
`TeX-completing-read-multiple'.
(LaTeX-amsthm-auto-cleanup): Remove the part for the deleted
`LaTeX-amsthm-theoremstyle-list'.
("amsthm"): Use `LaTeX-add-amsthm-newtheoremstyles' for
predefined styles.
Adjust the hook for deleted variable.
diff --git a/style/amsthm.el b/style/amsthm.el
index b99fda8..569cef9 100644
--- a/style/amsthm.el
+++ b/style/amsthm.el
@@ -39,11 +39,6 @@
(defvar LaTeX-amsthm-package-options nil
"Package options for the amsthm package.")
-(defvar LaTeX-amsthm-theoremstyle-list
- '(("plain") ("definition") ("remark"))
- "List of theorem styles provided by `amsthm.el' and new ones
-defined with \"\\newtheoremstyle\".")
-
(defvar LaTeX-amsthm-fontdecl
'(;; family
"rmfamily" "sffamily" "ttfamily"
@@ -66,10 +61,10 @@ argument. Use PROMPT as the prompt string."
;; `INITIAL-INPUT' (5th argument to `TeX-completing-read-multiple')
;; is hard-coded to `TeX-esc'.
(let* ((crm-separator (regexp-quote TeX-esc))
- (fontdecl (mapconcat 'identity
+ (fontdecl (mapconcat #'identity
(TeX-completing-read-multiple
- (TeX-argument-prompt optional prompt "Font")
- LaTeX-amsthm-fontdecl nil nil TeX-esc)
+ (TeX-argument-prompt optional prompt "Font: \\"
t)
+ LaTeX-amsthm-fontdecl)
TeX-esc)))
(TeX-argument-insert fontdecl optional)))
@@ -114,14 +109,9 @@ RefTeX users should customize or add ENVIRONMENT to
(defun LaTeX-amsthm-auto-cleanup ()
"Move parsed results from `LaTeX-auto-amsthm-newtheorem' and
-make them available as new environments. Update
-`LaTeX-amsthm-theoremstyle-list' with styles defined with
-\"\\newtheoremstyle\"."
- (dolist (newthm (mapcar 'car (LaTeX-amsthm-newtheorem-list)))
- (LaTeX-add-environments (list newthm 'LaTeX-amsthm-env-label)))
- (dolist (newthmstyle (LaTeX-amsthm-newtheoremstyle-list))
- (add-to-list (make-local-variable 'LaTeX-amsthm-theoremstyle-list)
- newthmstyle)))
+make them available as new environments."
+ (dolist (newthm (mapcar #'car (LaTeX-amsthm-newtheorem-list)))
+ (LaTeX-add-environments (list newthm 'LaTeX-amsthm-env-label))))
(add-hook 'TeX-auto-prepare-hook #'LaTeX-amsthm-auto-prepare t)
(add-hook 'TeX-auto-cleanup-hook #'LaTeX-amsthm-auto-cleanup t)
@@ -130,8 +120,14 @@ make them available as new environments. Update
(TeX-add-style-hook
"amsthm"
(lambda ()
+ ;; Add the pre-defined styles:
+ (LaTeX-add-amsthm-newtheoremstyles "definition"
+ "plain"
+ "remark")
+
(LaTeX-add-environments
'("proof" LaTeX-amsthm-env-label))
+
(TeX-add-symbols
;; Overrule the defintion in `latex.el':
'("newtheorem"
@@ -163,8 +159,10 @@ make them available as new environments. Update
(format "%s" heading)))))
'("theoremstyle"
- (TeX-arg-eval completing-read "Style: "
- LaTeX-amsthm-theoremstyle-list))
+ (TeX-arg-eval completing-read
+ (TeX-argument-prompt nil nil "Style")
+ ;; LaTeX-amsthm-theoremstyle-list
+ (LaTeX-amsthm-newtheoremstyle-list)))
"qedhere"
"swapnumbers"
@@ -174,14 +172,12 @@ make them available as new environments. Update
(let ((nthmstyle (TeX-read-string
(TeX-argument-prompt nil nil "Style name"))))
(LaTeX-add-amsthm-newtheoremstyles nthmstyle)
- (add-to-list (make-local-variable 'LaTeX-amsthm-theoremstyle-list)
- (list nthmstyle))
(format "%s" nthmstyle))))
(TeX-arg-length "Space above")
(TeX-arg-length "Space below")
- (LaTeX-arg-amsthm-fontdecl "Body font")
+ (LaTeX-arg-amsthm-fontdecl "Body font: \\")
"Indent amount"
- (LaTeX-arg-amsthm-fontdecl "Theorem head font")
+ (LaTeX-arg-amsthm-fontdecl "Theorem head font: \\")
"Punctuation after head"
(TeX-arg-length "Space after head")
"Theorem head spec"))
-----------------------------------------------------------------------
Summary of changes:
style/amsthm.el | 40 ++++++++++++++++++----------------------
1 file changed, 18 insertions(+), 22 deletions(-)
hooks/post-receive
--
GNU AUCTeX
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [AUCTeX-diffs] GNU AUCTeX branch, lexical-binding-attempt-1, updated. ae5d08232bb309ccc8653869d652f1eabe94be76,
Arash Esbati <=