[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] elpa 0bb9765 11/23: TikZ: Add prompting for \coordinate macro.
From: |
Tassilo Horn |
Subject: |
[elpa] elpa 0bb9765 11/23: TikZ: Add prompting for \coordinate macro. |
Date: |
Wed, 30 Mar 2016 19:08:02 +0000 |
branch: elpa
commit 0bb97652bbcbdc92bac7fdce1c0402eded1d9cb4
Author: Matthew Leach <address@hidden>
Commit: Matthew Leach <address@hidden>
TikZ: Add prompting for \coordinate macro.
* style/tikz.el (TeX-TikZ-point-function-map): New.
(TeX-TikZ-draw-arg-function-map): Use `TeX-TikZ-point-function-map'.
(TeX-TikZ-coordinate-arg): New.
---
style/tikz.el | 20 +++++++++++++++++---
1 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/style/tikz.el b/style/tikz.el
index af27c63..a877cb8 100644
--- a/style/tikz.el
+++ b/style/tikz.el
@@ -142,9 +142,14 @@ is finished."
;; Finish the macro.
(insert ";")))
-(defconst TeX-TikZ-draw-arg-function-map
+(defconst TeX-TikZ-point-function-map
'(("Rect Point" TeX-TikZ-arg-rect-point)
- ("Polar Point" TeX-TikZ-arg-polar-point)
+ ("Polar Point" TeX-TikZ-arg-polar-point))
+ "An alist of point specification types to their respective
+functions.")
+
+(defconst TeX-TikZ-draw-arg-function-map
+ `(,@TeX-TikZ-point-function-map
("Node" TeX-TikZ-arg-node)
("--" identity)
("-+" identity))
@@ -154,10 +159,19 @@ is finished."
(defun TeX-TikZ-draw-arg (optional)
(TeX-TikZ-macro-arg TeX-TikZ-draw-arg-function-map))
+(defun TeX-TikZ-coordinate-arg (optional)
+ "Prompt the user for the arguments to a TikZ coordinate macro."
+ (let ((options (TeX-TikZ-arg-options t))
+ (name (TeX-TikZ-arg-name nil))
+ (point (TeX-TikZ-single-macro-arg TeX-TikZ-point-function-map
+ "Coordinate point type: ")))
+ (insert options " " name " at" point ";")))
+
(TeX-add-style-hook
"tikz"
(lambda ()
(TeX-add-symbols
- '("draw" (TeX-TikZ-draw-arg)))
+ '("draw" (TeX-TikZ-draw-arg))
+ '("coordinate" (TeX-TikZ-coordinate-arg)))
(LaTeX-add-environments
'("tikzpicture"))))
- [elpa] elpa 1288609 07/23: Add fontification support, (continued)
- [elpa] elpa 1288609 07/23: Add fontification support, Tassilo Horn, 2016/03/30
- [elpa] elpa 00740ed 08/23: TikZ: split out the prompts to TeX-TikZ-arg-node & TeX-TikZ-macro-arg., Tassilo Horn, 2016/03/30
- [elpa] elpa c49b547 17/23: TikZ: Rename 'text' to 'label' to be consistent with TikZ terminology., Tassilo Horn, 2016/03/30
- [elpa] elpa 1cb2678 04/23: Delete redundant code, Tassilo Horn, 2016/03/30
- [elpa] elpa bb67e18 13/23: TikZ: Add 'Named Point' point type with completion., Tassilo Horn, 2016/03/30
- [elpa] elpa 0423aae 19/23: New function TeX-error-report-has-errors-p, Tassilo Horn, 2016/03/30
- [elpa] elpa df60ed5 05/23: Fix the name of argument in function body, Tassilo Horn, 2016/03/30
- [elpa] elpa 00430f2 21/23: Restore compatibility with XEmacs, Tassilo Horn, 2016/03/30
- [elpa] elpa b211827 10/23: TikZ: Extract the prompting of the next arg from TeX-TikZ-macro-arg., Tassilo Horn, 2016/03/30
- [elpa] elpa e8b5498 09/23: TikZ: allow arg type prompt to be specified., Tassilo Horn, 2016/03/30
- [elpa] elpa 0bb9765 11/23: TikZ: Add prompting for \coordinate macro.,
Tassilo Horn <=
- [elpa] elpa 4770a35 12/23: TikZ: Add prompting for TikZ's \node macro., Tassilo Horn, 2016/03/30
- [elpa] elpa 7573813 23/23: Release GNU AUCTeX 11.89.3, Tassilo Horn, 2016/03/30
- [elpa] elpa d120a27 22/23: Merge branch 'master' into elpa, Tassilo Horn, 2016/03/30