Skip to content

Commit

Permalink
Document why N to o and n to c are deprecated, say what to do (see #418
Browse files Browse the repository at this point in the history
…) [ci skip]
  • Loading branch information
Bruno Le Floch committed Nov 27, 2017
1 parent 1543003 commit 72eb6d1
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions l3kernel/l3expan.dtx
Expand Up @@ -146,16 +146,25 @@
% \end{verbatim}
% generates the functions |\foo:NV| and |\foo:cV| in the same
% way. The \cs{cs_generate_variant:Nn} function can only be applied if
% the \meta{parent control sequence} is already defined. Only |n|~and
% |N| arguments can be changed to other types, and |N|~can only be
% changed to~|c| while |n|~can only be changed to |V|, |v|, |o|,
% |f|, or~|x|, so that it is unambiguous what the \meta{parent} of
% a \meta{variant} is. If the \meta{parent
% the \meta{parent control sequence} is already defined. If the \meta{parent
% control sequence} is protected or if the \meta{variant} involves
% |x|~arguments, then the \meta{variant control sequence} is also
% protected. The \meta{variant} is created globally, as is any
% \cs[no-index]{exp_args:N\meta{variant}} function needed to carry out the
% expansion.
%
% Only |n|~and |N| arguments can be changed to other types, and
% |N|~can only be changed to~|c| while |n|~can only be changed to |V|,
% |v|, |o|, |f|, or~|x|, so that it is unambiguous what the
% \meta{parent} of a \meta{variant} is. For backwards-compatibility
% it is currently possible to make an |o|-type variant of an |N|-type
% argument or a |c|-type variant of an |n|-type argument. Both are
% deprecated. The first because an |o|-type argument may expand to
% more than one token. The second because programmers who use that
% most often want to access the value of a variable given its name,
% hence should use a |v|-type variant instead of |c|-type. In those
% cases, using the lower-level \cs{exp_args:No} or \cs{exp_args:Nc}
% functionns explicitly is preferred to defining confusing variants.
% \end{function}
%
% \section{Introducing the variants}
Expand Down

0 comments on commit 72eb6d1

Please sign in to comment.