[latex3-commits] [l3svn] 03/06: Enable expandable k-type arg. grabbing
noreply at latex-project.org
noreply at latex-project.org
Sun Nov 8 22:37:02 CET 2015
This is an automated email from the git hooks/post-receive script.
joseph pushed a commit to branch master
in repository l3svn.
commit d3c16a089c32b26255dd57d40526693778af3d85
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Sun Nov 8 20:38:39 2015 +0000
Enable expandable k-type arg. grabbing
---
l3packages/xparse/xparse.dtx | 50 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
diff --git a/l3packages/xparse/xparse.dtx b/l3packages/xparse/xparse.dtx
index 5eb5a0a..9a65006 100644
--- a/l3packages/xparse/xparse.dtx
+++ b/l3packages/xparse/xparse.dtx
@@ -1716,6 +1716,33 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\@@_add_expandable_type_k:w}
+% \begin{macro}{\@@_add_expandable_type_K:w}
+% \begin{macrocode}
+\cs_new_protected_nopar:Npn \@@_add_expandable_type_k:w #1
+ {
+ \exp_args:NNo
+ \@@_add_expandable_type_K:w #1 \c_@@_no_value_tl
+ }
+\cs_new_protected_nopar:Npn \@@_add_expandable_type_K:w #1#2
+ {
+ \@@_add_expandable_grabber_optional:n { K }
+ \bool_if:NTF \l_@@_all_long_bool
+ { \cs_set:cpx }
+ { \cs_set_nopar:cpx }
+ { \l_@@_expandable_aux_name_tl } ##1 #1 ##2
+ { ##1 {##2} }
+ \tl_put_right:Nx \l_@@_signature_tl
+ {
+ \exp_not:c { \l_@@_expandable_aux_name_tl }
+ \exp_not:n { #1 {#2} }
+ }
+ \@@_prepare_signature:N
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \begin{macro}{\@@_add_expandable_type_l:w}
% Invalid in expandable contexts (as the next left brace may have been
% inserted by \pkg{xparse} due to a failed search for an optional argument).
@@ -2867,6 +2894,29 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}[EXP]{\@@_expandable_grab_K:w}
+% \begin{macro}[EXP, aux]{\@@_expandable_grab_K_aux:NNwn}
+% As for the |D|-type grabber, use the auxiliary to do the look ahead
+% test then reuse it for the grabbing.
+% \begin{macrocode}
+\cs_new:Npn \@@_expandable_grab_K:w #1 \q_@@ #2
+ { #2 { \@@_expandable_grab_K_aux:NNwn #1 \q_@@ #2 } }
+\cs_new:Npn \@@_expandable_grab_K_aux:NNwn #1#2#3#4 \q_@@ #5#6
+ {
+ \str_if_eq:onTF { #1 { } #6 { } #2 { } } { { } #2 { } }
+ {
+ #1
+ { \@@_expandable_grab_K_aux:Nwn #5 #4 \q_@@ }
+ #6
+ }
+ { #4 {#3} \q_@@ #5 {#6} }
+ }
+\cs_new:Npn \@@_expandable_grab_K_aux:Nwn #1#2 \q_@@ #3
+ { #2 {#3} \q_@@ #1 }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \begin{macro}[EXP]{\@@_expandable_grab_m:w}
% \begin{macro}[EXP, aux]{\@@_expandable_grab_m_aux:wNn}
% The mandatory case is easy: find the auxiliary after the \cs{q_@@}, and
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the latex3-commits
mailing list