emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] elpa e8b5498 09/23: TikZ: allow arg type prompt to be specified.


From: Tassilo Horn
Subject: [elpa] elpa e8b5498 09/23: TikZ: allow arg type prompt to be specified.
Date: Wed, 30 Mar 2016 19:08:02 +0000

branch: elpa
commit e8b5498342962c4bd09c1b78c6ca79f0c9e68d44
Author: Matthew Leach <address@hidden>
Commit: Matthew Leach <address@hidden>

    TikZ: allow arg type prompt to be specified.
    
    * style/tikz.el (TeX-TikZ-get-arg-type): Add a new optional argument,
      prompt, and show that to the user when non-nil, instead of the
      default.
---
 style/tikz.el |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/style/tikz.el b/style/tikz.el
index f5e11b1..d7857b0 100644
--- a/style/tikz.el
+++ b/style/tikz.el
@@ -94,10 +94,14 @@ string \"node[OPTIONS](NAME){TEXT}\"."
         (text (TeX-TikZ-arg-text nil)))
     (concat "node" options name text " ")))
 
-(defun TeX-TikZ-get-arg-type (types)
-  "Prompt the user for the next argument type.
-TYPES is a list of possible types that the user can specify."
-  (completing-read "Next argument type (RET to finish): " types nil t))
+(defun TeX-TikZ-get-arg-type (types &optional 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 ((prompt (if prompt
+                    prompt
+                  "Next argument type (RET to finish): ")))
+    (completing-read prompt types nil t)))
 
 (defun TeX-TikZ-macro-arg (function-alist)
   "Prompt the user for arguments to compose a TikZ macro.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]