[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] elpa 09cc5d1 24/35: Improve font related queries
From: |
Tassilo Horn |
Subject: |
[elpa] elpa 09cc5d1 24/35: Improve font related queries |
Date: |
Sun, 31 Jan 2016 16:05:41 +0000 |
branch: elpa
commit 09cc5d1e170e4a7f85bcacd93b22526e4c425cf1
Author: Arash Esbati <address@hidden>
Commit: Mosè Giordano <address@hidden>
Improve font related queries
* style/amsthm.el (LaTeX-amsthm-fontdecl): Do not prefix the
elements with `TeX-esc'.
(LaTeX-arg-amsthm-fontdecl): New function.
("amsthm"): Use `LaTeX-arg-amsthm-fontdecl' for font related
queries.
Signed-off-by: Mosè Giordano <address@hidden>
---
style/amsthm.el | 50 ++++++++++++++++++++++++++++----------------------
1 files changed, 28 insertions(+), 22 deletions(-)
diff --git a/style/amsthm.el b/style/amsthm.el
index a01cfe3..5c83724 100644
--- a/style/amsthm.el
+++ b/style/amsthm.el
@@ -40,21 +40,34 @@
defined with \"\\newtheoremstyle\".")
(defvar LaTeX-amsthm-fontdecl
- (mapcar (lambda (elt) (concat TeX-esc elt))
- '(;; family
- "rmfamily" "sffamily" "ttfamily"
- ;; series
- "mdseries" "bfseries"
- ;; shape
- "upshape" "itshape" "slshape" "scshape"
- ;; size
- "tiny" "scriptsize" "footnotesize"
- "small" "normalsize" "large"
- "Large" "LARGE" "huge" "Huge"
- ;; reset macro
- "normalfont"))
+ '(;; family
+ "rmfamily" "sffamily" "ttfamily"
+ ;; series
+ "mdseries" "bfseries"
+ ;; shape
+ "upshape" "itshape" "slshape" "scshape"
+ ;; size
+ "tiny" "scriptsize" "footnotesize"
+ "small" "normalsize" "large"
+ "Large" "LARGE" "huge" "Huge"
+ ;; reset macro
+ "normalfont")
"List of font declaration commands for \"\\newtheoremstyle\".")
+(defun LaTeX-arg-amsthm-fontdecl (optional &optional prompt)
+ "Prompt for font declaration commands in \"\\newtheoremstyle\".
+If OPTIONAL is non-nil, insert the resulting value as an optional
+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
+ (TeX-completing-read-multiple
+ (TeX-argument-prompt optional prompt "Font")
+ LaTeX-amsthm-fontdecl nil nil TeX-esc)
+ TeX-esc)))
+ (TeX-argument-insert fontdecl optional)))
+
(defun LaTeX-amsthm-env-label (environment)
"Insert ENVIRONMENT, query for an optional argument and prompt
for label. AUCTeX users should add ENVIRONMENT to
@@ -161,16 +174,9 @@ make them available as new environments. Update
(format "%s" nthmstyle))))
(TeX-arg-length "Space above")
(TeX-arg-length "Space below")
- (TeX-arg-eval mapconcat 'identity
- (TeX-completing-read-multiple
- "Body font: "
- LaTeX-amsthm-fontdecl) "")
+ (LaTeX-arg-amsthm-fontdecl "Body font")
"Indent amount"
- (TeX-arg-eval mapconcat 'identity
- (TeX-completing-read-multiple
- "Theorem head font: "
- LaTeX-amsthm-fontdecl) "")
-
+ (LaTeX-arg-amsthm-fontdecl "Theorem head font")
"Punctuation after head"
(TeX-arg-length "Space after head")
"Theorem head spec"))
- [elpa] elpa d2c7bb3 19/35: Fix bug in subfigure style file, (continued)
- [elpa] elpa d2c7bb3 19/35: Fix bug in subfigure style file, Tassilo Horn, 2016/01/31
- [elpa] elpa 4f618ec 18/35: Add some AMS arrows to LaTeX-math-default, Tassilo Horn, 2016/01/31
- [elpa] elpa d68a089 11/35: Add new style/ntheorem.el, Tassilo Horn, 2016/01/31
- [elpa] elpa bafe761 17/35: url macro accepts only braces in hyperref, Tassilo Horn, 2016/01/31
- [elpa] elpa 107b249 21/35: Convert tex-font.el to UTF-8 coding, Tassilo Horn, 2016/01/31
- [elpa] elpa 255efa3 23/35: Write TeX-style-hook-dialect to parsed file, Tassilo Horn, 2016/01/31
- [elpa] elpa 58386b9 25/35: Improve font related queries, Tassilo Horn, 2016/01/31
- [elpa] elpa 601689e 20/35: Move \iff macro to Arrows section of LaTeX-math-default, Tassilo Horn, 2016/01/31
- [elpa] elpa be525cf 22/35: Add new dialects, Tassilo Horn, 2016/01/31
- [elpa] elpa f72d2a9 26/35: Improve font related queries, Tassilo Horn, 2016/01/31
- [elpa] elpa 09cc5d1 24/35: Improve font related queries,
Tassilo Horn <=
- [elpa] elpa 34a0ecc 30/35: Add completion for environments in ConTeXt, Tassilo Horn, 2016/01/31
- [elpa] elpa e9ddab9 28/35: Code cleaning, Tassilo Horn, 2016/01/31
- [elpa] elpa d9f61d5 32/35: Capture message of LaTeX warnings, Tassilo Horn, 2016/01/31
- [elpa] elpa ba7755d 27/35: Improve style/enumitem, Tassilo Horn, 2016/01/31
- [elpa] elpa cffe98a 31/35: Use default argument of completing-read in ConTeXt-environment, Tassilo Horn, 2016/01/31
- [elpa] elpa 5293a02 34/35: * Version 11.89.1 released., Tassilo Horn, 2016/01/31
- [elpa] elpa b1ec3ed 29/35: Change coding back to iso-8859-1, XEmacs doesn't support utf-8, Tassilo Horn, 2016/01/31
- [elpa] elpa 0a99c11 35/35: Upgrade docs for release., Tassilo Horn, 2016/01/31
- [elpa] elpa 1bb965f 33/35: Merge branch 'master' into elpa, Tassilo Horn, 2016/01/31