[latex3-commits] [l3svn] r6303 - Minor code/doc cleanups in xparse

noreply at latex-project.org noreply at latex-project.org
Sun Nov 22 16:31:34 CET 2015


Author: bruno
Date: 2015-11-22 16:31:34 +0100 (Sun, 22 Nov 2015)
New Revision: 6303

Modified:
   trunk/l3packages/xparse/xparse.dtx
Log:
Minor code/doc cleanups in xparse


Modified: trunk/l3packages/xparse/xparse.dtx
===================================================================
--- trunk/l3packages/xparse/xparse.dtx	2015-11-21 07:42:20 UTC (rev 6302)
+++ trunk/l3packages/xparse/xparse.dtx	2015-11-22 15:31:34 UTC (rev 6303)
@@ -1114,8 +1114,8 @@
 % \begin{macro}{\@@_count_mandatory:n}
 % \begin{macro}{\@@_count_mandatory:N}
 % \begin{macro}[aux]{\@@_count_mandatory:N}
-%   To count up mandatory arguments before the main parsing run, the same
-%   approach is used. First, check if the current token is a short-cut for
+%   Loop through the signature To count up mandatory arguments before the
+%   main parsing run. First, check if the current token is a short-cut for
 %   another argument type. If it is, expand it and loop again. If not, then
 %   look for a \enquote{counting} function to check the argument type. No error
 %   is raised here if one is not found as one will be raised by later code.
@@ -1349,12 +1349,12 @@
 %
 % \subsection{Setting up a standard signature}
 %
-% All of the argument-adding functions work in essentially the same
-% way, except the one for \texttt{m} arguments. Any collected \texttt{m}
-% arguments are added to the signature, then the appropriate grabber
-% is added to the signature. Some of the adding functions also pick up
-% one or more arguments, and are also added to the signature. All of the
-% functions then call the loop function \cs{@@_prepare_signature:N}.
+% Each argument-adding function appends to the signature a grabber (and
+% for some types, the delimiters or default value), except the one for
+% \texttt{m} arguments.  These are collected and added to the signature
+% all at once by \cs{@@_flush_m_args:}, called for every other argument
+% type.  All of the functions then call the loop function
+% \cs{@@_prepare_signature:N}.
 %
 % \begin{macro}{\@@_add_type_+:w}
 %   Making the next argument long means setting the flag and knocking one back
@@ -1381,8 +1381,8 @@
 %    \begin{macrocode}
 \cs_new_protected:cpn { @@_add_type_>:w } #1
   {
-    \bool_set_true:N \l_@@_processor_bool
     \@@_flush_m_args:
+    \bool_set_true:N \l_@@_processor_bool
     \int_decr:N \l_@@_current_arg_int
     \tl_put_right:Nn \l_@@_signature_tl { \@@_process_arg:n {#1} }
     \@@_prepare_signature_bypass:N
@@ -1548,9 +1548,8 @@
     \int_compare:nNnT \l_@@_m_args_int > \c_zero
       {
         \tl_put_right:Nx \l_@@_signature_tl
-           { \exp_not:c { @@_grab_m_ \int_use:N \l_@@_m_args_int :w } }
-        \int_set:Nn \l_@@_mandatory_args_int
-          { \l_@@_mandatory_args_int - \l_@@_m_args_int }
+          { \exp_not:c { @@_grab_m_ \int_use:N \l_@@_m_args_int :w } }
+        \int_sub:Nn \l_@@_mandatory_args_int { \l_@@_m_args_int }
       }
     \int_zero:N \l_@@_m_args_int
   }
@@ -1877,7 +1876,7 @@
   }
 \cs_new_protected_nopar:Npn \@@_add_expandable_long_check:
   {
-    \bool_if:nT { \l_@@_all_long_bool && ! ( \l_@@_long_bool ) }
+    \bool_if:nT { \l_@@_all_long_bool && ! \l_@@_long_bool }
       { \__msg_kernel_error:nn { xparse } { inconsistent-long } }
   }
 %    \end{macrocode}



More information about the latex3-commits mailing list