>From 22efb8ed0023757ee02ee97a073e79287db468df Mon Sep 17 00:00:00 2001 From: Ikumi Keita Date: Sat, 8 Oct 2022 23:16:25 +0900 Subject: [PATCH 3/3] Don't insert empty node name * style/tikz.el (TeX-TikZ-node-arg): Treat node name as optional to avoid the insertion of empty node name. (TeX-TikZ-arg-options, TeX-TikZ-arg-name,TeX-TikZ-arg-label): Fix doc strings. --- style/tikz.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/style/tikz.el b/style/tikz.el index eb7d9281..a0edfd46 100644 --- a/style/tikz.el +++ b/style/tikz.el @@ -112,7 +112,7 @@ Ask the user for r and theta values, and return the string (defun TeX-TikZ-arg-options (optional) "Prompt the user for options to a TikZ macro. -If OPTIONAL is non-nil, always return `LaTeX-optop' and +If OPTIONAL is nil, always return `LaTeX-optop' and `LaTeX-optcl', even if the user doesn't provide any input." (let ((options (TeX-read-string (TeX-argument-prompt optional nil "Options" )))) (if optional @@ -121,7 +121,7 @@ If OPTIONAL is non-nil, always return `LaTeX-optop' and (defun TeX-TikZ-arg-name (optional) "Prompt the user for a TikZ name. -If OPTIONAL is non-nil, always return \"()\", even if the user +If OPTIONAL is nil, always return \"()\", even if the user doesn't provide any input." (let ((name (TeX-read-string (TeX-argument-prompt optional nil "Name" )))) (if optional @@ -130,8 +130,8 @@ doesn't provide any input." (defun TeX-TikZ-arg-label (optional) "Prompt the user for TikZ label. -If OPTIONAL is non-nil always return `TeX-grop' and `TeX-grcl', -even if the user doesn't provide any input." +If OPTIONAL is nil always return `TeX-grop' and `TeX-grcl', even +if the user doesn't provide any input." (let ((label (TeX-read-string (TeX-argument-prompt optional nil "Label" )))) (if optional (TeX-TikZ-get-opt-arg-string label TeX-grop TeX-grcl) @@ -278,7 +278,7 @@ return \"\"." (defun TeX-TikZ-node-arg (_ignored) "Prompt the user for the arguments to a TikZ node macro." (let ((options (TeX-TikZ-arg-options t)) - (name (TeX-TikZ-arg-name nil)) + (name (TeX-TikZ-arg-name t)) (point (TeX-TikZ-single-macro-arg TeX-TikZ-point-function-map "Node point type: ")) (label (TeX-TikZ-arg-label nil))) -- 2.37.3