[latex3-commits] [l3svn] 04/04: Switch from "k"- to "e"-type

noreply at latex-project.org noreply at latex-project.org
Fri Nov 18 21:27:05 CET 2016


This is an automated email from the git hooks/post-receive script.

joseph pushed a commit to branch master
in repository l3svn.

commit b5adad3cd26cf518099611baa4e8f6ea8f80ed0b
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Fri Nov 18 20:22:43 2016 +0000

    Switch from "k"- to "e"-type
---
 l3packages/xparse/testfiles/xparse004.lvt |    6 +-
 l3packages/xparse/testfiles/xparse004.tlg |    6 +-
 l3packages/xparse/xparse.dtx              |  162 ++++++++++++++---------------
 3 files changed, 87 insertions(+), 87 deletions(-)

diff --git a/l3packages/xparse/testfiles/xparse004.lvt b/l3packages/xparse/testfiles/xparse004.lvt
index cf3de7b..860d825 100644
--- a/l3packages/xparse/testfiles/xparse004.lvt
+++ b/l3packages/xparse/testfiles/xparse004.lvt
@@ -78,15 +78,15 @@
     \foo stop
   }
 
-\TEST { Basic~k-type~argument~definitions }
+\TEST { Basic~e-type~argument~definitions }
   {
-    \DeclareDocumentCommand \foo { k { ^ _ } m }
+    \DeclareDocumentCommand \foo { e { ^ _ } m }
       { \TYPE { (#1) (#2) } }
     \foo { there }
     \foo ^ { up } { here }
     \foo _ { down } { here }
     \foo ^ { up } _ { down } { here }
-    \DeclareDocumentCommand \foo { k { ^ _ } }
+    \DeclareDocumentCommand \foo { e { ^ _ } }
       { \TYPE { (#1) } }
     \foo stop
     \foo ^ { up } stop
diff --git a/l3packages/xparse/testfiles/xparse004.tlg b/l3packages/xparse/testfiles/xparse004.tlg
index 40ccf15..4c94524 100644
--- a/l3packages/xparse/testfiles/xparse004.tlg
+++ b/l3packages/xparse/testfiles/xparse004.tlg
@@ -258,12 +258,12 @@ l. ...  }
 (drat)(drat)
 ============================================================
 ============================================================
-TEST 5: Basic k-type argument definitions
+TEST 5: Basic e-type argument definitions
 ============================================================
 .................................................
 . LaTeX info: "xparse/define-command"
 . 
-. Defining command \foo with sig. 'k{^_}m' on line ....
+. Defining command \foo with sig. 'e{^_}m' on line ....
 .................................................
 ({-NoValue-}{-NoValue-})(there)
 ({up}{-NoValue-})(here)
@@ -272,7 +272,7 @@ TEST 5: Basic k-type argument definitions
 .................................................
 . LaTeX info: "xparse/redefine-command"
 . 
-. Redefining command \foo with sig. 'k{^_}' on line ....
+. Redefining command \foo with sig. 'e{^_}' on line ....
 .................................................
 ({-NoValue-}{-NoValue-})
 ({up}{-NoValue-})
diff --git a/l3packages/xparse/xparse.dtx b/l3packages/xparse/xparse.dtx
index 4ed7805..b9e3f87 100644
--- a/l3packages/xparse/xparse.dtx
+++ b/l3packages/xparse/xparse.dtx
@@ -195,7 +195,7 @@
 %     |-NoValue-| if not present.
 %   \item[G] As for \texttt{g} but returns \meta{default} if no value
 %     is given: \texttt{G}\marg{default}.
-%   \item[k] An optional set of \emph{keys}, each of which requires a
+%   \item[e] An optional set of \emph{embellishments}, each of which requires a
 %     \emph{value}. If a key is not present, |-NoValue-| is returned.
 %     The returned data is a token list comprising one braced entry per key,
 %     ordered as for the key list in the signature.
@@ -1150,9 +1150,9 @@
 %     \@@_count_type_+:w,
 %     \@@_count_type_d:w,
 %     \@@_count_type_D:w,
+%     \@@_count_type_e:w,
 %     \@@_count_type_g:w,
 %     \@@_count_type_G:w,
-%     \@@_count_type_k:w,
 %     \@@_count_type_m:w,
 %     \@@_count_type_r:w,
 %     \@@_count_type_R:w,
@@ -1202,14 +1202,14 @@
     \quark_if_recursion_tail_stop_do:nn {#3} { \@@_bad_arg_spec:wn }
     \@@_count_mandatory:N
   }
-\cs_new_protected:Npn \@@_count_type_g:w
-  { \@@_count_mandatory:N }
-\cs_new_protected:Npn \@@_count_type_G:w #1
+\cs_new_protected:Npn \@@_count_type_e:w #1
   {
     \quark_if_recursion_tail_stop_do:nn {#1} { \@@_bad_arg_spec:wn }
     \@@_count_mandatory:N
   }
-\cs_new_protected:Npn \@@_count_type_k:w #1
+\cs_new_protected:Npn \@@_count_type_g:w
+  { \@@_count_mandatory:N }
+\cs_new_protected:Npn \@@_count_type_G:w #1
   {
     \quark_if_recursion_tail_stop_do:nn {#1} { \@@_bad_arg_spec:wn }
     \@@_count_mandatory:N
@@ -1408,6 +1408,19 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\@@_add_type_e:w}
+%   No default here: there is just a token to look for.
+%    \begin{macrocode}
+\cs_new_protected:Npn \@@_add_type_e:w #1
+  {
+    \@@_flush_m_args:
+    \@@_add_grabber_optional:N e
+    \tl_put_right:Nn \l_@@_signature_tl { {#1} }
+    \@@_prepare_signature:N
+  }
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}{\@@_add_type_g:w}
 %   The \texttt{g} type is simply an alias for \texttt{G} with the correct
 %   default built-in.
@@ -1431,19 +1444,6 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{\@@_add_type_k:w}
-%   No default here: there is just a token to look for.
-%    \begin{macrocode}
-\cs_new_protected:Npn \@@_add_type_k:w #1
-  {
-    \@@_flush_m_args:
-    \@@_add_grabber_optional:N k
-    \tl_put_right:Nn \l_@@_signature_tl { {#1} }
-    \@@_prepare_signature:N
-  }
-%    \end{macrocode}
-% \end{macro}
-%
 % \begin{macro}{\@@_add_type_l:w}
 %   Finding \texttt{l} arguments is very simple: there is nothing to do
 %   other than add the grabber.
@@ -2053,79 +2053,37 @@
 % \end{macro}
 % \end{macro}
 %
-% \begin{macro}{\@@_grab_G:w}
-% \begin{macro}{\@@_grab_G_long:w}
-% \begin{macro}{\@@_grab_G_trailing:w}
-% \begin{macro}{\@@_grab_G_long_trailing:w}
-% \begin{macro}[aux]{\@@_grab_G_aux:nnNn}
-%   Optional groups are checked by meaning, so that the same code will
-%   work with, for example, Con\TeX{}t-like input.
-%    \begin{macrocode}
-\cs_new_protected:Npn \@@_grab_G:w #1#2 \l_@@_args_tl
-  {
-    \@@_grab_G_aux:nnNn {#1} {#2} \cs_set_protected_nopar:Npn
-      { _ignore_spaces }
-  }
-\cs_new_protected:Npn \@@_grab_G_long:w #1#2 \l_@@_args_tl
-  {
-    \@@_grab_G_aux:nnNn {#1} {#2} \cs_set_protected:Npn { _ignore_spaces }
-  }
-\cs_new_protected:Npn \@@_grab_G_trailing:w #1#2 \l_@@_args_tl
-  { \@@_grab_G_aux:nnNn {#1} {#2} \cs_set_protected_nopar:Npn { } }
-\cs_new_protected:Npn \@@_grab_G_long_trailing:w #1#2 \l_@@_args_tl
-  { \@@_grab_G_aux:nnNn {#1} {#2} \cs_set_protected:Npn { } }
-\cs_new_protected:Npn \@@_grab_G_aux:nnNn #1#2#3#4
-  {
-    \exp_after:wN #3 \l_@@_fn_tl ##1
-      {
-        \@@_add_arg:n {##1}
-        #2 \l_@@_args_tl
-      }
-    \use:c { peek_meaning #4 :NTF } \c_group_begin_token
-      { \l_@@_fn_tl }
-      {
-        \@@_add_arg:n {#1}
-        #2 \l_@@_args_tl
-      }
-  }
-%    \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
 % \begin{macro}
-%   {\@@_grab_k:w, \@@_grab_k_long:w, \@@_grab_k_trailing:w, \@@_grab_k_long_trailing:w}
-% \begin{macro}[aux]{\@@_grab_k:nnNn}
-% \begin{macro}[aux]{\@@_grab_k_loop:nnN}
-% \begin{macro}[aux]{\@@_grab_k_finalise:}
+%   {\@@_grab_e:w, \@@_grab_e_long:w, \@@_grab_e_trailing:w, \@@_grab_e_long_trailing:w}
+% \begin{macro}[aux]{\@@_grab_e:nnNn}
+% \begin{macro}[aux]{\@@_grab_e_loop:nnN}
+% \begin{macro}[aux]{\@@_grab_e_finalise:}
 %   Everything here needs to point to a loop.
 %    \begin{macrocode}
-\cs_new_protected:Npn \@@_grab_k:w #1#2 \l_@@_args_tl
+\cs_new_protected:Npn \@@_grab_e:w #1#2 \l_@@_args_tl
   {
-    \@@_grab_k:nnNn
+    \@@_grab_e:nnNn
        {#1} {#2}
       \cs_set_protected_nopar:Npn
       { _ignore_spaces }
   }
-\cs_new_protected:Npn \@@_grab_k_long:w #1#2 \l_@@_args_tl
+\cs_new_protected:Npn \@@_grab_e_long:w #1#2 \l_@@_args_tl
   {
-    \@@_grab_k:nnNn
+    \@@_grab_e:nnNn
       {#1} {#2}
       \cs_set_protected:Npn
       { _ignore_spaces }
   }
-\cs_new_protected:Npn \@@_grab_k_trailing:w #1#2 \l_@@_args_tl
+\cs_new_protected:Npn \@@_grab_e_trailing:w #1#2 \l_@@_args_tl
   {
-    \@@_grab_k:nnNn
+    \@@_grab_e:nnNn
       {#1} {#2}
       \cs_set_protected_nopar:Npn
       { }
   }
-\cs_new_protected:Npn \@@_grab_k_long_trailing:w #1#2 \l_@@_args_tl
+\cs_new_protected:Npn \@@_grab_e_long_trailing:w #1#2 \l_@@_args_tl
   {
-    \@@_grab_k:nnNn
+    \@@_grab_e:nnNn
       {#1} {#2}
       \cs_set_protected:Npn
       { }
@@ -2136,15 +2094,15 @@
 %   they can appear later. The grabbed values are held in a property list
 %   which is then turned into an ordered list to be passed back to the user.
 %    \begin{macrocode}
-\cs_new_protected:Npn \@@_grab_k:nnNn #1#2#3#4
+\cs_new_protected:Npn \@@_grab_e:nnNn #1#2#3#4
   {
     \exp_after:wN #3 \l_@@_fn_tl ##1##2##3
       {
         \prop_put:Nnn \l_@@_tmp_prop {##1} {##3}
-        \@@_grab_k_loop:nnN {#4} { } ##2 \q_recursion_stop
+        \@@_grab_e_loop:nnN {#4} { } ##2 \q_recursion_stop
       }
     \prop_clear:N \l_@@_tmp_prop
-    \cs_set_protected:Npn \@@_grab_k_finalise:
+    \cs_set_protected:Npn \@@_grab_e_finalise:
       {
         \tl_clear:N \l_@@_tmpa_tl
         \tl_map_inline:nn {#1}
@@ -2160,25 +2118,67 @@
         \@@_add_arg:V \l_@@_tmpa_tl
         #2 \l_@@_args_tl
       }
-    \@@_grab_k_loop:nnN {#4} { } #1 \q_recursion_tail \q_recursion_stop
+    \@@_grab_e_loop:nnN {#4} { } #1 \q_recursion_tail \q_recursion_stop
   }
-\cs_new_protected:Npn \@@_grab_k_loop:nnN #1#2#3#4 \q_recursion_stop
+\cs_new_protected:Npn \@@_grab_e_loop:nnN #1#2#3#4 \q_recursion_stop
   {
     \cs_if_eq:NNTF #3 \q_recursion_tail
-      { \@@_grab_k_finalise: }
+      { \@@_grab_e_finalise: }
       {
         \use:c { peek_meaning_remove #1 :NTF } #3
           { \l_@@_fn_tl #3 {#2#4} }
-          { \@@_grab_k_loop:nnN {#1} {#2#3} #4 \q_recursion_stop }
+          { \@@_grab_e_loop:nnN {#1} {#2#3} #4 \q_recursion_stop }
       }
   }
-\cs_new_protected:Npn \@@_grab_k_finalise: { }
+\cs_new_protected:Npn \@@_grab_e_finalise: { }
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
 % \end{macro}
 % \end{macro}
 %
+% \begin{macro}{\@@_grab_G:w}
+% \begin{macro}{\@@_grab_G_long:w}
+% \begin{macro}{\@@_grab_G_trailing:w}
+% \begin{macro}{\@@_grab_G_long_trailing:w}
+% \begin{macro}[aux]{\@@_grab_G_aux:nnNn}
+%   Optional groups are checked by meaning, so that the same code will
+%   work with, for example, Con\TeX{}t-like input.
+%    \begin{macrocode}
+\cs_new_protected:Npn \@@_grab_G:w #1#2 \l_@@_args_tl
+  {
+    \@@_grab_G_aux:nnNn {#1} {#2} \cs_set_protected_nopar:Npn
+      { _ignore_spaces }
+  }
+\cs_new_protected:Npn \@@_grab_G_long:w #1#2 \l_@@_args_tl
+  {
+    \@@_grab_G_aux:nnNn {#1} {#2} \cs_set_protected:Npn { _ignore_spaces }
+  }
+\cs_new_protected:Npn \@@_grab_G_trailing:w #1#2 \l_@@_args_tl
+  { \@@_grab_G_aux:nnNn {#1} {#2} \cs_set_protected_nopar:Npn { } }
+\cs_new_protected:Npn \@@_grab_G_long_trailing:w #1#2 \l_@@_args_tl
+  { \@@_grab_G_aux:nnNn {#1} {#2} \cs_set_protected:Npn { } }
+\cs_new_protected:Npn \@@_grab_G_aux:nnNn #1#2#3#4
+  {
+    \exp_after:wN #3 \l_@@_fn_tl ##1
+      {
+        \@@_add_arg:n {##1}
+        #2 \l_@@_args_tl
+      }
+    \use:c { peek_meaning #4 :NTF } \c_group_begin_token
+      { \l_@@_fn_tl }
+      {
+        \@@_add_arg:n {#1}
+        #2 \l_@@_args_tl
+      }
+  }
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
 % \begin{macro}{\@@_grab_l:w}
 % \begin{macro}{\@@_grab_l_long:w}
 % \begin{macro}[aux]{\@@_grab_l_aux:nN}

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the latex3-commits mailing list