Hi all, Attached is a patch that adds more path connector types to the TikZ style. From the TikZ manual I see that there are a set of "base" connectors, e.g. "--", "-|". For each of these I derive another two path connector types, namely they have " +" and " ++" appended to them. I've tried to do this pragmatically and attached is a patch that does work but depends upon `-mapcat' from dash.
I'm not sure whether XEmacs has dash, so it may break the build for it or if there is a better way to achieve what I'm trying to do. Comments? Thanks, -- Matt
>From 0a9fc4913866d61a9fc81331c2e2468925a9ecb4 Mon Sep 17 00:00:00 2001 From: Matthew Leach <[email protected]> Date: Tue, 29 Mar 2016 18:13:45 +0100 Subject: [PATCH] TikZ: Add more path connector types. * style/tikz.el (TeX-TikZ-path-connector-function-map): New. (TeX-TikZ-draw-arg-function-map): Use `TeX-TikZ-path-connector-function-map. --- style/tikz.el | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/style/tikz.el b/style/tikz.el index 8447b7b..a30ef9b 100644 --- a/style/tikz.el +++ b/style/tikz.el @@ -178,11 +178,22 @@ them as a list of strings, dropping the '()'." ("Named Point" TeX-TikZ-arg-named-point)) "An alist of point specification types and their functions." ) +(defconst TeX-TikZ-path-connector-function-map + (let ((connectors '("--" "|-" "-|"))) + (-mapcat + (lambda (connector) + `((,connector identity) + (,(concat connector " +") identity) + (,(concat connector " ++") identity))) + connectors)) + "An alist of path connectors. +A set of base connectors along with variants that have \" +\" and +\" ++\" appended to them, mapping to the identity function.") + (defconst TeX-TikZ-draw-arg-function-map `(,@TeX-TikZ-point-function-map - ("Node" TeX-TikZ-arg-node) - ("--" identity) - ("-+" identity)) + ,@TeX-TikZ-path-connector-function-map + ("Node" TeX-TikZ-arg-node)) "An alist of argument names and functoins for TikZ's \draw.") (defun TeX-TikZ-draw-arg (_ignored) -- 2.7.4
_______________________________________________ auctex-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/auctex-devel
