diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/expl3/l3basics.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/expl3/l3basics.dtx | 607 |
1 files changed, 9 insertions, 598 deletions
diff --git a/Master/texmf-dist/source/latex/expl3/l3basics.dtx b/Master/texmf-dist/source/latex/expl3/l3basics.dtx index defe09a5277..69e40a05f59 100644 --- a/Master/texmf-dist/source/latex/expl3/l3basics.dtx +++ b/Master/texmf-dist/source/latex/expl3/l3basics.dtx @@ -35,7 +35,7 @@ \RequirePackage{l3names} %</driver|package> %\fi -\GetIdInfo$Id: l3basics.dtx 1905 2010-05-19 07:45:31Z joseph $ +\GetIdInfo$Id: l3basics.dtx 1921 2010-05-22 08:28:54Z joseph $ {L3 Experimental basic definitions} %\iffalse %<*driver> @@ -703,16 +703,6 @@ % when called. This is not allowed for normal functions. % \end{function} % -% \begin{function}{\cs_new_local:Npn | -% \cs_new_local:Npx | -% \cs_new_local:cpn | -% \cs_new_local:cpx } -% \begin{syntax} -% "\cs_new_local:Npn" <cs> <parms> \Arg{code} -% \end{syntax} -% Local versions of the above functions. -% \end{function} -% % \begin{function}{\cs_new_nopar:Npn | % \cs_new_nopar:Npx | % \cs_new_nopar:cpn | @@ -729,17 +719,6 @@ % (under the "x" variants). % \end{function} % -% \begin{function}{\cs_new_local_nopar:Npn | -% \cs_new_local_nopar:Npx | -% \cs_new_local_nopar:cpn | -% \cs_new_local_nopar:cpx } -% \begin{syntax} -% "\cs_new_local_nopar:Npn" <cs> <parms> \Arg{code} -% \end{syntax} -% Like "\cs_new_nopar:Npn" but defines the new function locally. See -% comments above. -% \end{function} -% % \begin{function}{\cs_new_protected:Npn | % \cs_new_protected:Npx | % \cs_new_protected:cpn | @@ -752,16 +731,6 @@ % in the argument(s) when called. % \end{function} % -% \begin{function}{ \cs_new_local_protected:Npn | -% \cs_new_local_protected:Npx | -% \cs_new_local_protected:cpn | -% \cs_new_local_protected:cpx } -% \begin{syntax} -% "\cs_new_local_protected:Npn" <cs> <parms> \Arg{code} -% \end{syntax} -% Local versions of the above functions. -% \end{function} -% % \begin{function}{\cs_new_protected_nopar:Npn | % \cs_new_protected_nopar:Npx | % \cs_new_protected_nopar:cpn | @@ -774,132 +743,6 @@ % expansion. % \end{function} % -% \begin{function}{\cs_new_local_protected_nopar:Npn | -% \cs_new_local_protected_nopar:Npx | -% \cs_new_local_protected_nopar:cpn | -% \cs_new_local_protected_nopar:cpx } -% \begin{syntax} -% "\cs_new_local_protected_nopar:Npn" <cs> <parms> \Arg{code} -% \end{syntax} -% Local versions of the above functions. -% \end{function} -% -% -% -% -% -% -% -% -% -% \subsection{Defining new functions using the signature} -% -% -% \begin{function}{\cs_new:Nn | -% \cs_new:Nx | -% \cs_new:cn | -% \cs_new:cx -% } -% \begin{syntax} -% "\cs_new:Nn" <cs> \Arg{code} -% \end{syntax} -% Defines a new function, making sure that <cs> is unused so far. The -% parameter text is automatically detected from the length of the -% function signature. If <cs> is missing a colon in its name, an error -% is raised. It is under the responsibility of the programmer to name -% the new function according to the rules laid out in the previous -% section. <code> is either passed literally or may be subject to -% expansion (under the "x" variants). -% \begin{texnote} -% Internally, these use \TeX's "\long". These forms are -% recommended for low-level definitions as experience has shown that "\par" -% tokens often turn up in programming situations that wouldn't have been -% expected. -% \end{texnote} -% \end{function} -% -% \begin{function}{\cs_new_local:Nn | -% \cs_new_local:Nx | -% \cs_new_local:cn | -% \cs_new_local:cx -% } -% \begin{syntax} -% "\cs_new_local:Nn" <cs> \Arg{code} -% \end{syntax} -% Local versions of the above functions. -% \end{function} -% -% \begin{function}{\cs_new_nopar:Nn | -% \cs_new_nopar:Nx | -% \cs_new_nopar:cn | -% \cs_new_nopar:cx -% } -% \begin{syntax} -% "\cs_new_nopar:Nn" <cs> \Arg{code} -% \end{syntax} -% Version of the above in which "\par" is not allowed to appear within the -% argument(s) of the defined functions. -% \end{function} -% -% \begin{function}{\cs_new_local_nopar:Nn | -% \cs_new_local_nopar:Nx | -% \cs_new_local_nopar:cn | -% \cs_new_local_nopar:cx -% } -% \begin{syntax} -% "\cs_new_local_nopar:Nn" <cs> \Arg{code} -% \end{syntax} -% Local versions of the above functions. -% \end{function} -% -% \begin{function}{\cs_new_protected:Nn | -% \cs_new_protected:Nx | -% \cs_new_protected:cn | -% \cs_new_protected:cx -% } -% \begin{syntax} -% "\cs_new_protected:Nn" <cs> \Arg{code} -% \end{syntax} -% Defines a function that is both robust and may contain "\par" tokens -% in the argument(s) when called. -% \end{function} -% -% \begin{function}{\cs_new_local_protected:Nn | -% \cs_new_local_protected:Nx | -% \cs_new_local_protected:cn | -% \cs_new_local_protected:cx -% } -% \begin{syntax} -% "\cs_new_local_protected:Nn" <cs> \Arg{code} -% \end{syntax} -% Local versions of the above functions. -% \end{function} -% -% \begin{function}{\cs_new_protected_nopar:Nn | -% \cs_new_protected_nopar:Nx | -% \cs_new_protected_nopar:cn | -% \cs_new_protected_nopar:cx -% } -% \begin{syntax} -% "\cs_new_protected_nopar:Nn" <cs> \Arg{code} -% \end{syntax} -% Defines a function that does not expand when inside an |x| type -% expansion. "\par" is not allowed in the argument(s) of the defined function. -% \end{function} -% -% \begin{function}{\cs_new_local_protected_nopar:Nn | -% \cs_new_local_protected_nopar:Nx | -% \cs_new_local_protected_nopar:cn | -% \cs_new_local_protected_nopar:cx -% } -% \begin{syntax} -% "\cs_new_local_protected_nopar:Nn" <cs> \Arg{code} -% \end{syntax} -% Local versions of the above functions. -% \end{function} -% -% -% % \subsection{Defining functions using primitive parameter text} % % @@ -1019,107 +862,6 @@ % \end{function} % % -% \subsection{Defining functions using the signature (no checks)} -% -% As above but now detecting the parameter text from inspecting the -% signature. -% -% \begin{function}{\cs_set:Nn | -% \cs_set:Nx | -% \cs_set:cn | -% \cs_set:cx | -% } -% \begin{syntax} -% "\cs_set:Nn" <cs> \Arg{code} -% \end{syntax} -% Like "\cs_set_nopar:Nn" but allows "\par" tokens in the arguments of the -% function being defined. -% \end{function} -% -% \begin{function}{\cs_gset:Nn | -% \cs_gset:Nx | -% \cs_gset:cn | -% \cs_gset:cx | -% } -% \begin{syntax} -% "\cs_gset:Nn" <cs> \Arg{code} -% \end{syntax} -% Global variant of "\cs_set:Nn". -% \end{function} -% -% \begin{function}{\cs_set_nopar:Nn | -% \cs_set_nopar:Nx | -% \cs_set_nopar:cn | -% \cs_set_nopar:cx | -% } -% \begin{syntax} -% "\cs_set_nopar:Nn" <cs> \Arg{code} -% \end{syntax} -% Like "\cs_new_nopar:Nn" etc.\ but does not check the <cs> name. -% \end{function} -% -% \begin{function}{\cs_gset_nopar:Nn | -% \cs_gset_nopar:Nx | -% \cs_gset_nopar:cn | -% \cs_gset_nopar:cx | -% } -% \begin{syntax} -% "\cs_gset_nopar:Nn" <cs> \Arg{code} -% \end{syntax} -% Like "\cs_set_nopar:Nn" but defines the <cs> globally. -% \end{function} -% -% \begin{function}{\cs_set_protected:Nn | -% \cs_set_protected:cn | -% \cs_set_protected:Nx | -% \cs_set_protected:cx | -% } -% \begin{syntax} -% "\cs_set_protected:Nn" <cs> \Arg{code} -% \end{syntax} -% Naturally robust macro that won't expand in an |x| type argument. -% These varieties also allow |\par| tokens in the arguments of the -% function being defined. -% \end{function} -% -% \begin{function}{\cs_gset_protected:Nn | -% \cs_gset_protected:cn | -% \cs_gset_protected:Nx | -% \cs_gset_protected:cx | -% } -% \begin{syntax} -% "\cs_gset_protected:Nn" <cs> \Arg{code} -% \end{syntax} -% Global versions of the above functions. -% \end{function} -% -% \begin{function}{\cs_set_protected_nopar:Nn | -% \cs_set_protected_nopar:cn | -% \cs_set_protected_nopar:Nx | -% \cs_set_protected_nopar:cx | -% } -% \begin{syntax} -% "\cs_set_protected_nopar:Nn" <cs> \Arg{code} -% \end{syntax} -% Naturally robust macro that won't expand in an |x| type argument. -% This also comes as a |long| version. If you for some reason want to -% expand it inside an |x| type expansion, prefix it with -% |\exp_after:wN \prg_do_nothing:|. -% \end{function} -% -% \begin{function}{\cs_gset_protected_nopar:Nn | -% \cs_gset_protected_nopar:cn | -% \cs_gset_protected_nopar:Nx | -% \cs_gset_protected_nopar:cx | -% } -% \begin{syntax} -% "\cs_gset_protected_nopar:Nn" <cs> \Arg{code} -% \end{syntax} -% Global versions of the above functions. -% \end{function} -% -% -% % \subsection{Undefining functions} % % \begin{function}{ @@ -1144,11 +886,7 @@ % \begin{function}{ \cs_new_eq:NN | % \cs_new_eq:cN | % \cs_new_eq:Nc | -% \cs_new_eq:cc | -% \cs_new_local_eq:NN | -% \cs_new_local_eq:cN | -% \cs_new_local_eq:Nc | -% \cs_new_local_eq:cc } +% \cs_new_eq:cc } % \begin{syntax} % "\cs_new_eq:NN" <cs1> <cs2> % \end{syntax} @@ -2556,42 +2294,6 @@ % % % -% \begin{macro}{\cs_new_local_nopar:Npn} -% \begin{macro}{\cs_new_local_nopar:Npx} -% \begin{macro}{\cs_new_local:Npn} -% \begin{macro}{\cs_new_local:Npx} -% \begin{macro}{\cs_new_local_protected_nopar:Npn} -% \begin{macro}{\cs_new_local_protected_nopar:Npx} -% \begin{macro}{\cs_new_local_protected:Npn} -% \begin{macro}{\cs_new_local_protected:Npx} -% These are like |\cs_set_nopar:Npn| and |\cs_set_eq:NN|, but they -% first check that the argument command is not already in use. You -% may use |\pref_global:D|, |\pref_long:D|, |\pref_protected:D|, and -% |\tex_outer:D| as prefixes. -% \begin {macrocode} -\cs_set:Npn \cs_tmp:w #1#2{ - \cs_set_protected_nopar:Npn #1 ##1 { - \chk_if_free_cs:N ##1 - #2 ##1 - } -} -\cs_tmp:w \cs_new_local_nopar:Npn \cs_set_nopar:Npn -\cs_tmp:w \cs_new_local_nopar:Npx \cs_set_nopar:Npx -\cs_tmp:w \cs_new_local:Npn \cs_set:Npn -\cs_tmp:w \cs_new_local:Npx \cs_set:Npx -\cs_tmp:w \cs_new_local_protected_nopar:Npn \cs_set_protected_nopar:Npn -\cs_tmp:w \cs_new_local_protected_nopar:Npx \cs_set_protected_nopar:Npx -\cs_tmp:w \cs_new_local_protected:Npn \cs_set_protected:Npn -\cs_tmp:w \cs_new_local_protected:Npx \cs_set_protected:Npx -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} % % \begin{macro}{\cs_new_nopar:Npn} % \begin{macro}{\cs_new_nopar:Npx} @@ -2603,6 +2305,13 @@ % \begin{macro}{\cs_new_protected:Npx} % Global versions of the above functions. % \begin {macrocode} +\cs_set:Npn \cs_tmp:w #1#2 { + \cs_set_protected_nopar:Npn #1 ##1 + { + \chk_if_free_cs:N ##1 + #2 ##1 + } +} \cs_tmp:w \cs_new_nopar:Npn \cs_gset_nopar:Npn \cs_tmp:w \cs_new_nopar:Npx \cs_gset_nopar:Npx \cs_tmp:w \cs_new:Npn \cs_gset:Npn @@ -2629,8 +2338,6 @@ % \begin{macro}{\cs_gset_nopar:cpx} % \begin{macro}{\cs_new_nopar:cpn} % \begin{macro}{\cs_new_nopar:cpx} -% \begin{macro}{\cs_new_local_nopar:cpn} -% \begin{macro}{\cs_new_local_nopar:cpx} % Like |\cs_set_nopar:Npn| and |\cs_new_nopar:Npn|, except that the % first argument consists of the sequence of characters that should % be used to form the name of the desired control sequence (the |c| @@ -2649,8 +2356,6 @@ \cs_tmp:w \cs_set_nopar:cpx \cs_set_nopar:Npx \cs_tmp:w \cs_gset_nopar:cpn \cs_gset_nopar:Npn \cs_tmp:w \cs_gset_nopar:cpx \cs_gset_nopar:Npx -\cs_tmp:w \cs_new_local_nopar:cpn \cs_new_local_nopar:Npn -\cs_tmp:w \cs_new_local_nopar:cpx \cs_new_local_nopar:Npx \cs_tmp:w \cs_new_nopar:cpn \cs_new_nopar:Npn \cs_tmp:w \cs_new_nopar:cpx \cs_new_nopar:Npx % \end{macrocode} @@ -2660,8 +2365,6 @@ % \end{macro} % \end{macro} % \end{macro} -% \end{macro} -% \end{macro} % % % @@ -2671,8 +2374,6 @@ % \begin{macro}{\cs_gset:cpx} % \begin{macro}{\cs_new:cpn} % \begin{macro}{\cs_new:cpx} -% \begin{macro}{\cs_new_local:cpn} -% \begin{macro}{\cs_new_local:cpx} % Variants of the |\cs_set:Npn| versions which make a csname out % of the first arguments. We may also do this globally. % \begin{macrocode} @@ -2682,8 +2383,6 @@ \cs_tmp:w \cs_gset:cpx \cs_gset:Npx \cs_tmp:w \cs_new:cpn \cs_new:Npn \cs_tmp:w \cs_new:cpx \cs_new:Npx -\cs_tmp:w \cs_new_local:cpn \cs_new_local:Npn -\cs_tmp:w \cs_new_local:cpx \cs_new_local:Npx % \end{macrocode} % \end{macro} % \end{macro} @@ -2691,8 +2390,6 @@ % \end{macro} % \end{macro} % \end{macro} -% \end{macro} -% \end{macro} % % \begin{macro}{\cs_set_protected_nopar:cpn} % \begin{macro}{\cs_set_protected_nopar:cpx} @@ -2700,8 +2397,6 @@ % \begin{macro}{\cs_gset_protected_nopar:cpx} % \begin{macro}{\cs_new_protected_nopar:cpn} % \begin{macro}{\cs_new_protected_nopar:cpx} -% \begin{macro}{\cs_new_local_protected_nopar:cpn} -% \begin{macro}{\cs_new_local_protected_nopar:cpx} % Variants of the |\cs_set_protected_nopar:Npn| versions which make a csname % out of the first arguments. We may also do this globally. % \begin{macrocode} @@ -2711,8 +2406,6 @@ \cs_tmp:w \cs_gset_protected_nopar:cpx \cs_gset_protected_nopar:Npx \cs_tmp:w \cs_new_protected_nopar:cpn \cs_new_protected_nopar:Npn \cs_tmp:w \cs_new_protected_nopar:cpx \cs_new_protected_nopar:Npx -\cs_tmp:w \cs_new_local_protected_nopar:cpn \cs_new_local_protected_nopar:Npn -\cs_tmp:w \cs_new_local_protected_nopar:cpx \cs_new_local_protected_nopar:Npx % \end{macrocode} % \end{macro} % \end{macro} @@ -2720,8 +2413,6 @@ % \end{macro} % \end{macro} % \end{macro} -% \end{macro} -% \end{macro} % % \begin{macro}{\cs_set_protected:cpn} % \begin{macro}{\cs_set_protected:cpx} @@ -2729,8 +2420,6 @@ % \begin{macro}{\cs_gset_protected:cpx} % \begin{macro}{\cs_new_protected:cpn} % \begin{macro}{\cs_new_protected:cpx} -% \begin{macro}{\cs_new_local_protected:cpn} -% \begin{macro}{\cs_new_local_protected:cpx} % Variants of the |\cs_set_protected:Npn| versions which make a csname % out of the first arguments. We may also do this globally. % \begin{macrocode} @@ -2740,8 +2429,6 @@ \cs_tmp:w \cs_gset_protected:cpx \cs_gset_protected:Npx \cs_tmp:w \cs_new_protected:cpn \cs_new_protected:Npn \cs_tmp:w \cs_new_protected:cpx \cs_new_protected:Npx -\cs_tmp:w \cs_new_local_protected:cpn \cs_new_local_protected:Npn -\cs_tmp:w \cs_new_local_protected:cpx \cs_new_local_protected:Npx % \end{macrocode} % \end{macro} % \end{macro} @@ -2749,8 +2436,6 @@ % \end{macro} % \end{macro} % \end{macro} -% \end{macro} -% \end{macro} % % BACKWARDS COMPATIBILITY: % \begin{macrocode} @@ -2875,23 +2560,6 @@ % \end{macro} % \end{macro} % -% \begin{macro}{\cs_new_local_eq:NN} -% \begin{macro}{\cs_new_local_eq:cN} -% \begin{macro}{\cs_new_local_eq:Nc} -% \begin{macro}{\cs_new_local_eq:cc} -% \begin{macrocode} -\cs_new_protected:Npn \cs_new_local_eq:NN #1 { - \chk_if_free_cs:N #1 - \cs_set_eq:NN #1 -} -\cs_new_protected_nopar:Npn \cs_gnew_eq:cN { \exp_args:Nc \cs_gnew_eq:NN } -\cs_new_protected_nopar:Npn \cs_gnew_eq:Nc { \exp_args:NNc \cs_gnew_eq:NN } -\cs_new_protected_nopar:Npn \cs_gnew_eq:cc { \exp_args:Ncc \cs_gnew_eq:NN } -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} % % BACKWARDS COMPATIBILITY % \begin{macrocode} @@ -3107,263 +2775,6 @@ % \end{macro} % % -% -% -% \subsection{Using the signature to define functions} -% -% We can now combine some of the tools we have to provide a simple -% interface for defining functions. We define some simpler functions -% with user interface |\cs_set:Nn \foo_bar:nn {#1,#2}|, i.e., the -% number of arguments is read from the signature. -% -% -% \begin{macro}{\cs_set:Nn} -% \begin{macro}{\cs_set:Nx} -% \begin{macro}{\cs_set_nopar:Nn} -% \begin{macro}{\cs_set_nopar:Nx} -% \begin{macro}{\cs_set_protected:Nn} -% \begin{macro}{\cs_set_protected:Nx} -% \begin{macro}{\cs_set_protected_nopar:Nn} -% \begin{macro}{\cs_set_protected_nopar:Nx} -% \begin{macro}{\cs_gset:Nn} -% \begin{macro}{\cs_gset:Nx} -% \begin{macro}{\cs_gset_nopar:Nn} -% \begin{macro}{\cs_gset_nopar:Nx} -% \begin{macro}{\cs_gset_protected:Nn} -% \begin{macro}{\cs_gset_protected:Nx} -% \begin{macro}{\cs_gset_protected_nopar:Nn} -% \begin{macro}{\cs_gset_protected_nopar:Nx} -% We want to define |\cs_set:Nn| as -% \begin{verbatim} -% \cs_set_protected:Npn \cs_set:Nn #1#2{ -% \cs_generate_from_arg_count:NNnn #1\cs_set:Npn -% {\cs_get_arg_count_from_signature:N #1}{#2} -% } -% \end{verbatim} -% In short, to define |\cs_set:Nn| we need just use |\cs_set:Npn|, -% everything else is the same for each variant. Therefore, we can -% make it simpler by temporarily defining a function to do this for -% us. -% \begin{macrocode} -\cs_set:Npn \cs_tmp:w #1#2#3{ - \cs_set_protected:cpx {cs_#1:#2}##1##2{ - \exp_not:N \cs_generate_from_arg_count:NNnn ##1 - \exp_after:wN \exp_not:N \cs:w cs_#1:#3 \cs_end: - {\exp_not:N\cs_get_arg_count_from_signature:N ##1}{##2} - } -} -% \end{macrocode} -% Then we define the 32 variants beginning with |N|. -% \begin{macrocode} -\cs_tmp:w {set}{Nn}{Npn} -\cs_tmp:w {set}{Nx}{Npx} -\cs_tmp:w {set_nopar}{Nn}{Npn} -\cs_tmp:w {set_nopar}{Nx}{Npx} -\cs_tmp:w {set_protected}{Nn}{Npn} -\cs_tmp:w {set_protected}{Nx}{Npx} -\cs_tmp:w {set_protected_nopar}{Nn}{Npn} -\cs_tmp:w {set_protected_nopar}{Nx}{Npx} -\cs_tmp:w {gset}{Nn}{Npn} -\cs_tmp:w {gset}{Nx}{Npx} -\cs_tmp:w {gset_nopar}{Nn}{Npn} -\cs_tmp:w {gset_nopar}{Nx}{Npx} -\cs_tmp:w {gset_protected}{Nn}{Npn} -\cs_tmp:w {gset_protected}{Nx}{Npx} -\cs_tmp:w {gset_protected_nopar}{Nn}{Npn} -\cs_tmp:w {gset_protected_nopar}{Nx}{Npx} -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% -% \begin{macro}{\cs_new:Nn} -% \begin{macro}{\cs_new:Nx} -% \begin{macro}{\cs_new_nopar:Nn} -% \begin{macro}{\cs_new_nopar:Nx} -% \begin{macro}{\cs_new_protected:Nn} -% \begin{macro}{\cs_new_protected:Nx} -% \begin{macro}{\cs_new_protected_nopar:Nn} -% \begin{macro}{\cs_new_protected_nopar:Nx} -% \begin{macro}{\cs_new_local:Nn} -% \begin{macro}{\cs_new_local:Nx} -% \begin{macro}{\cs_new_local_nopar:Nn} -% \begin{macro}{\cs_new_local_nopar:Nx} -% \begin{macro}{\cs_new_local_protected:Nn} -% \begin{macro}{\cs_new_local_protected:Nx} -% \begin{macro}{\cs_new_local_protected_nopar:Nn} -% \begin{macro}{\cs_new_local_protected_nopar:Nx} -% \begin{macrocode} -\cs_tmp:w {new}{Nn}{Npn} -\cs_tmp:w {new}{Nx}{Npx} -\cs_tmp:w {new_nopar}{Nn}{Npn} -\cs_tmp:w {new_nopar}{Nx}{Npx} -\cs_tmp:w {new_protected}{Nn}{Npn} -\cs_tmp:w {new_protected}{Nx}{Npx} -\cs_tmp:w {new_protected_nopar}{Nn}{Npn} -\cs_tmp:w {new_protected_nopar}{Nx}{Npx} -\cs_tmp:w {new_local}{Nn}{Npn} -\cs_tmp:w {new_local}{Nx}{Npx} -\cs_tmp:w {new_local_nopar}{Nn}{Npn} -\cs_tmp:w {new_local_nopar}{Nx}{Npx} -\cs_tmp:w {new_local_protected}{Nn}{Npn} -\cs_tmp:w {new_local_protected}{Nx}{Npx} -\cs_tmp:w {new_local_protected_nopar}{Nn}{Npn} -\cs_tmp:w {new_local_protected_nopar}{Nx}{Npx} -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% -% Then something similar for the |c| variants. -% \begin{verbatim} -% \cs_set_protected:Npn \cs_set:cn #1#2{ -% \cs_generate_from_arg_count:cNnn {#1}\cs_set:Npn -% {\cs_get_arg_count_from_signature:c {#1}}{#2} -% } -% \end{verbatim} -% \begin{macrocode} -\cs_set:Npn \cs_tmp:w #1#2#3{ - \cs_set_protected:cpx {cs_#1:#2}##1##2{ - \exp_not:N\cs_generate_from_arg_count:cNnn {##1} - \exp_after:wN \exp_not:N \cs:w cs_#1:#3 \cs_end: - {\exp_not:N\cs_get_arg_count_from_signature:c {##1}}{##2} - } -} -% \end{macrocode} -% \begin{macro}{\cs_set:cn} -% \begin{macro}{\cs_set:cx} -% \begin{macro}{\cs_set_nopar:cn} -% \begin{macro}{\cs_set_nopar:cx} -% \begin{macro}{\cs_set_protected:cn} -% \begin{macro}{\cs_set_protected:cx} -% \begin{macro}{\cs_set_protected_nopar:cn} -% \begin{macro}{\cs_set_protected_nopar:cx} -% \begin{macro}{\cs_gset:cn} -% \begin{macro}{\cs_gset:cx} -% \begin{macro}{\cs_gset_nopar:cn} -% \begin{macro}{\cs_gset_nopar:cx} -% \begin{macro}{\cs_gset_protected:cn} -% \begin{macro}{\cs_gset_protected:cx} -% \begin{macro}{\cs_gset_protected_nopar:cn} -% \begin{macro}{\cs_gset_protected_nopar:cx} -% The 32 |c| variants. -% \begin{macrocode} -\cs_tmp:w {set}{cn}{Npn} -\cs_tmp:w {set}{cx}{Npx} -\cs_tmp:w {set_nopar}{cn}{Npn} -\cs_tmp:w {set_nopar}{cx}{Npx} -\cs_tmp:w {set_protected}{cn}{Npn} -\cs_tmp:w {set_protected}{cx}{Npx} -\cs_tmp:w {set_protected_nopar}{cn}{Npn} -\cs_tmp:w {set_protected_nopar}{cx}{Npx} -\cs_tmp:w {gset}{cn}{Npn} -\cs_tmp:w {gset}{cx}{Npx} -\cs_tmp:w {gset_nopar}{cn}{Npn} -\cs_tmp:w {gset_nopar}{cx}{Npx} -\cs_tmp:w {gset_protected}{cn}{Npn} -\cs_tmp:w {gset_protected}{cx}{Npx} -\cs_tmp:w {gset_protected_nopar}{cn}{Npn} -\cs_tmp:w {gset_protected_nopar}{cx}{Npx} -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% -% \begin{macro}{\cs_new:cn} -% \begin{macro}{\cs_new:cx} -% \begin{macro}{\cs_new_nopar:cn} -% \begin{macro}{\cs_new_nopar:cx} -% \begin{macro}{\cs_new_protected:cn} -% \begin{macro}{\cs_new_protected:cx} -% \begin{macro}{\cs_new_protected_nopar:cn} -% \begin{macro}{\cs_new_protected_nopar:cx} -% \begin{macro}{\cs_new_local:cn} -% \begin{macro}{\cs_new_local:cx} -% \begin{macro}{\cs_new_local_nopar:cn} -% \begin{macro}{\cs_new_local_nopar:cx} -% \begin{macro}{\cs_new_local_protected:cn} -% \begin{macro}{\cs_new_local_protected:cx} -% \begin{macro}{\cs_new_local_protected_nopar:cn} -% \begin{macro}{\cs_new_local_protected_nopar:cx} -% \begin{macrocode} -\cs_tmp:w {new}{cn}{Npn} -\cs_tmp:w {new}{cx}{Npx} -\cs_tmp:w {new_nopar}{cn}{Npn} -\cs_tmp:w {new_nopar}{cx}{Npx} -\cs_tmp:w {new_protected}{cn}{Npn} -\cs_tmp:w {new_protected}{cx}{Npx} -\cs_tmp:w {new_protected_nopar}{cn}{Npn} -\cs_tmp:w {new_protected_nopar}{cx}{Npx} -\cs_tmp:w {new_local}{cn}{Npn} -\cs_tmp:w {new_local}{cx}{Npx} -\cs_tmp:w {new_local_nopar}{cn}{Npn} -\cs_tmp:w {new_local_nopar}{cx}{Npx} -\cs_tmp:w {new_local_protected}{cn}{Npn} -\cs_tmp:w {new_local_protected}{cx}{Npx} -\cs_tmp:w {new_local_protected_nopar}{cn}{Npn} -\cs_tmp:w {new_local_protected_nopar}{cx}{Npx} -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% -% -% -% -% -% % \begin{macro}{\cs_if_eq_p:NN,\cs_if_eq_p:cN,\cs_if_eq_p:Nc,\cs_if_eq_p:cc} % \begin{macro}[TF]{\cs_if_eq:NN,\cs_if_eq:cN,\cs_if_eq:Nc,\cs_if_eq:cc} % Check if two control sequences are identical. |