[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] elpa ae6ed8b 06/51: TikZ: make `TeX-TikZ-single-macro-arg' prompt
From: |
Tassilo Horn |
Subject: |
[elpa] elpa ae6ed8b 06/51: TikZ: make `TeX-TikZ-single-macro-arg' prompt required. |
Date: |
Sun, 22 May 2016 07:22:47 +0000 (UTC) |
branch: elpa
commit ae6ed8b21742ae50189084e4a2d95baebb87052b
Author: Matthew Leach <address@hidden>
Commit: Matthew Leach <address@hidden>
TikZ: make `TeX-TikZ-single-macro-arg' prompt required.
* style/tikz.el (TeX-TikZ-get-arg-type): Make prompt non-optional.
(TeX-TikZ-single-macro-arg): Likewise.
(TeX-TikZ-macro-arg): Make prompt explicit.
---
style/tikz.el | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/style/tikz.el b/style/tikz.el
index b29abf8..d335cbc 100644
--- a/style/tikz.el
+++ b/style/tikz.el
@@ -94,17 +94,14 @@ string \"node[OPTIONS](NAME){TEXT}\"."
(label (TeX-TikZ-arg-label nil)))
(concat "node" options name label " ")))
-(defun TeX-TikZ-get-arg-type (types &optional prompt)
+(defun TeX-TikZ-get-arg-type (types prompt)
"Prompt the user for an argument type.
-TYPES is a list of possible types that the user can specify. If
-PROMPT is non-nil use that prompt instead."
- (let ((completion-ignore-case t)
- (prompt (if prompt
- prompt
- "Next argument type (RET to finish): ")))
+TYPES is a list of possible types that the user can specify. Use
+PROMPT as the prompt for input."
+ (let ((completion-ignore-case t))
(completing-read prompt types nil t)))
-(defun TeX-TikZ-single-macro-arg (function-alist &optional prompt)
+(defun TeX-TikZ-single-macro-arg (function-alist prompt)
"Prompt the user for a single argument to compose a TikZ macro.
FUNCTION-ALIST is a mapping of argument-types to functions. The
user is prompted for the argument type, the chosen function is
@@ -128,7 +125,8 @@ is finished."
;; For the iterative version, we need to add "" to the
;; function-alist, allowing the user to end the macro.
(function-alist-iterative `(,@function-alist ("" identity)))
- (string-to-insert (TeX-TikZ-single-macro-arg
function-alist-iterative)))
+ (prompt "Next argument type (RET to finish): ")
+ (string-to-insert (TeX-TikZ-single-macro-arg function-alist-iterative
prompt)))
;; Insert the macro options.
(insert options " ")
@@ -138,7 +136,7 @@ is finished."
(while (not (string= string-to-insert ""))
(insert string-to-insert)
(setq string-to-insert
- (TeX-TikZ-single-macro-arg function-alist-iterative)))
+ (TeX-TikZ-single-macro-arg function-alist-iterative prompt)))
;; Finish the macro.
(insert ";")))
- [elpa] elpa 56c1afd 28/51: Call TeX-newline-function interactively, (continued)
- [elpa] elpa 56c1afd 28/51: Call TeX-newline-function interactively, Tassilo Horn, 2016/05/22
- [elpa] elpa eb9986d 46/51: Respect both "xcolor" and "color" for query to "shadecolor", Tassilo Horn, 2016/05/22
- [elpa] elpa 40c2c26 32/51: Allow for negative offsets in region backward search, Tassilo Horn, 2016/05/22
- [elpa] elpa 9613bdd 36/51: Check TeX engine only once, Tassilo Horn, 2016/05/22
- [elpa] elpa d9910d4 21/51: Fix small errors in doc string and comment, Tassilo Horn, 2016/05/22
- [elpa] elpa 6eb95e6 14/51: Integrate viewer support between tex.el and tex-jp.el, Tassilo Horn, 2016/05/22
- [elpa] elpa e90e050 34/51: Insert braces after some macros and \relax after \ProcessOptions, Tassilo Horn, 2016/05/22
- [elpa] elpa 0a3632e 45/51: Adjust query commands for loading by xcolor.el, Tassilo Horn, 2016/05/22
- [elpa] elpa adf998c 25/51: Replace TeX-PDF-via-dvips-ps2pdf with TeX-PDF-from-DVI, Tassilo Horn, 2016/05/22
- [elpa] elpa 3e93869 43/51: Add new style/xcolor.el, Tassilo Horn, 2016/05/22
- [elpa] elpa ae6ed8b 06/51: TikZ: make `TeX-TikZ-single-macro-arg' prompt required.,
Tassilo Horn <=
- [elpa] elpa d83900b 09/51: TikZ: Make '+' and '++' prefixes apply to TikZ points, Tassilo Horn, 2016/05/22
- [elpa] elpa ae6cb79 26/51: Reword documentation of TeX-PDF-from-DVI, Tassilo Horn, 2016/05/22
- [elpa] elpa 1c397d5 29/51: Fix TeX-error-overview-make-entries, Tassilo Horn, 2016/05/22
- [elpa] elpa e092f72 35/51: Use commit date to determine package date, Tassilo Horn, 2016/05/22
- [elpa] elpa 7b41d77 38/51: Adapt for upLaTeX, Tassilo Horn, 2016/05/22
- [elpa] elpa d6b107e 33/51: Improve style/doc.el, Tassilo Horn, 2016/05/22
- [elpa] elpa cf54f7d 49/51: Make ChangeLog UTF-8, Tassilo Horn, 2016/05/22
- [elpa] elpa ebf4b8a 51/51: Release GNU AUCTeX 11.89.4, Tassilo Horn, 2016/05/22
- [elpa] elpa 8c6f901 48/51: Append environment indentation rules to LaTeX-indent-environment-list, Tassilo Horn, 2016/05/22
- [elpa] elpa e78a13c 03/51: * tex-buf.el: Address some compiler warnings, Tassilo Horn, 2016/05/22