[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] elpa 58386b9 25/35: Improve font related queries
From: |
Tassilo Horn |
Subject: |
[elpa] elpa 58386b9 25/35: Improve font related queries |
Date: |
Sun, 31 Jan 2016 16:05:41 +0000 |
branch: elpa
commit 58386b9b16a17a486342cb272f46acbee44af5de
Author: Arash Esbati <address@hidden>
Commit: Mosè Giordano <address@hidden>
Improve font related queries
* style/ntheorem.el (LaTeX-ntheorem-fontdecl): Do not prefix the
elements with `TeX-esc'.
(LaTeX-arg-ntheorem-fontdecl): New function.
("ntheorem"): Use `LaTeX-arg-ntheorem-fontdecl' for font related
queries.
Signed-off-by: Mosè Giordano <address@hidden>
---
style/ntheorem.el | 49 ++++++++++++++++++++++++++++---------------------
1 files changed, 28 insertions(+), 21 deletions(-)
diff --git a/style/ntheorem.el b/style/ntheorem.el
index cedc5a8..630c09b 100644
--- a/style/ntheorem.el
+++ b/style/ntheorem.el
@@ -49,21 +49,34 @@ defined with \"\\newtheoremstyle\".")
defined with \"\\newtheoremlisttype\".")
(defvar LaTeX-ntheorem-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-ntheorem-fontdecl (optional &optional prompt)
+ "Prompt for font declaration commands in \"\\theorem(body\|header)font\".
+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
declaration")
+ LaTeX-ntheorem-fontdecl nil nil TeX-esc)
+ TeX-esc)))
+ (TeX-argument-insert fontdecl optional)))
+
(defun LaTeX-ntheorem-env-label (environment)
"Insert ENVIRONMENT, query for an optional argument and prompt
for label. AUCTeX users should add ENVIRONMENT to
@@ -190,16 +203,10 @@ make them available as new environments. Update
LaTeX-ntheorem-theoremstyle-list))
'("theorembodyfont"
- (TeX-arg-eval mapconcat 'identity
- (TeX-completing-read-multiple
- "Body font: "
- LaTeX-ntheorem-fontdecl) ""))
+ (LaTeX-arg-ntheorem-fontdecl "Body font"))
'("theoremheaderfont"
- (TeX-arg-eval mapconcat 'identity
- (TeX-completing-read-multiple
- "Header font: "
- LaTeX-ntheorem-fontdecl) ""))
+ (LaTeX-arg-ntheorem-fontdecl "Header font"))
'("theoremnumbering"
(TeX-arg-eval completing-read
- [elpa] elpa 15ebec9 12/35: Rename TeX-after-compilation-finished-hook to -functions, (continued)
- [elpa] elpa 15ebec9 12/35: Rename TeX-after-compilation-finished-hook to -functions, Tassilo Horn, 2016/01/31
- [elpa] elpa 23612ac 15/35: Delete .cvsignore, Tassilo Horn, 2016/01/31
- [elpa] elpa 8cd9b0d 14/35: Fix query prompt, Tassilo Horn, 2016/01/31
- [elpa] elpa 2ebd71d 16/35: Fix bug in `preview-LaTeX-disable-pdfoutput', Tassilo Horn, 2016/01/31
- [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 <=
- [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, 2016/01/31
- [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