[latex3-commits] [l3svn] 02/02: Add \char_(g)set_active_eq:nN
noreply at latex-project.org
noreply at latex-project.org
Wed Sep 2 10:20:28 CEST 2015
This is an automated email from the git hooks/post-receive script.
joseph pushed a commit to branch master
in repository l3svn.
commit 501afe4e1ff3ae89bbc75744f006eca07ba42927
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Wed Sep 2 09:02:04 2015 +0100
Add \char_(g)set_active_eq:nN
This matches the pattern seen in for example \char_set_catcode:nn
and \char_ste_catocde:Nn. Both versions have their uses/places
where they are clearest.
---
l3kernel/l3candidates.dtx | 39 +++++++++++++++++++++++--------
l3kernel/testfiles/m3expl001.luatex.tlg | 2 ++
l3kernel/testfiles/m3expl001.tlg | 2 ++
l3kernel/testfiles/m3expl001.xetex.tlg | 2 ++
l3kernel/testfiles/m3expl003.luatex.tlg | 2 ++
l3kernel/testfiles/m3expl003.tlg | 2 ++
l3kernel/testfiles/m3expl003.xetex.tlg | 2 ++
7 files changed, 41 insertions(+), 10 deletions(-)
diff --git a/l3kernel/l3candidates.dtx b/l3kernel/l3candidates.dtx
index 8aa4aca..d3c2fee 100644
--- a/l3kernel/l3candidates.dtx
+++ b/l3kernel/l3candidates.dtx
@@ -1039,8 +1039,21 @@
% \begin{syntax}
% \cs{char_set_active_eq:NN} \meta{char} \meta{function}
% \end{syntax}
-% Sets the behaviour of the \meta{char} in situations where it is an
-% active char (category code $13$) to be equivalent to that of the
+% Sets the behaviour of the \meta{char} in situations where it is
+% active (category code $13$) to be equivalent to that of the
+% \meta{function}. The category code of the \meta{char} is
+% \emph{unchanged} by this process. The \meta{function} may itself
+% be an active character.
+% \end{function}
+%
+% \begin{function}[added = 2015-09-02]
+% {\char_set_active_eq:nN, \char_gset_active_eq:nN}
+% \begin{syntax}
+% \cs{char_set_active_eq:nN} \Arg{integer expression \meta{function}
+% \end{syntax}
+% Sets the behaviour of the \meta{char} which has character
+% code as given by the \meta{integer expression} in situations
+% where it is active (category code $13$) to be equivalent to that of the
% \meta{function}. The category code of the \meta{char} is
% \emph{unchanged} by this process. The \meta{function} may itself
% be an active character.
@@ -4299,24 +4312,30 @@
%<@@=char>
% \end{macrocode}
%
-% \begin{macro}{\char_set_active_eq:NN, \char_gset_active_eq:NN}
-% Two simple functions with very similar definitions, so set up using
+% \begin{macro}
+% {^^A
+% \char_set_active_eq:NN, \char_gset_active_eq:NN,
+% \char_set_active_eq:nN, \char_gset_active_eq:nN
+% }
+% Four simple functions with very similar definitions, so set up using
% an auxiliary.
% \begin{macrocode}
\group_begin:
\char_set_catcode_active:N \^^@
- \cs_set_protected:Npn \char_tmp:NN #1#2
+ \cs_set_protected:Npn \char_tmp:nN #1#2
{
- \cs_new_protected:Npn #1 ##1
+ \cs_new_protected:cpn { #1 :nN } ##1
{
\group_begin:
- \char_set_catcode_active:n { `##1 }
- \char_set_lccode:nn { `\^^@ } { `##1 }
+ \char_set_catcode_active:n { ##1 }
+ \char_set_lccode:nn { `\^^@ } { ##1 }
\tex_lowercase:D { \group_end: #2 ^^@ }
}
+ \cs_new_protected:cpx { #1 :NN } ##1
+ { \exp_not:c { #1 : nN } { `##1 } }
}
- \char_tmp:NN \char_set_active_eq:NN \cs_set_eq:NN
- \char_tmp:NN \char_gset_active_eq:NN \cs_gset_eq:NN
+ \char_tmp:nN { char_set_active_eq } \cs_set_eq:NN
+ \char_tmp:nN { char_gset_active_eq } \cs_gset_eq:NN
\group_end:
% \end{macrocode}
% \end{macro}
diff --git a/l3kernel/testfiles/m3expl001.luatex.tlg b/l3kernel/testfiles/m3expl001.luatex.tlg
index 2a961ed..4b0d05e 100644
--- a/l3kernel/testfiles/m3expl001.luatex.tlg
+++ b/l3kernel/testfiles/m3expl001.luatex.tlg
@@ -4204,7 +4204,9 @@ Defining \c__tl_change_case_misc_lower_tl on line ...
Defining \tl_log:N on line ...
Defining \tl_log:c on line ...
Defining \tl_log:n on line ...
+Defining \char_set_active_eq:nN on line ...
Defining \char_set_active_eq:NN on line ...
+Defining \char_gset_active_eq:nN on line ...
Defining \char_gset_active_eq:NN on line ...
Defining \__peek_execute_branches_N_type: on line ...
Defining \__peek_N_type:w on line ...
diff --git a/l3kernel/testfiles/m3expl001.tlg b/l3kernel/testfiles/m3expl001.tlg
index 2dab29d..d9a47c1 100644
--- a/l3kernel/testfiles/m3expl001.tlg
+++ b/l3kernel/testfiles/m3expl001.tlg
@@ -4203,7 +4203,9 @@ Defining \c__tl_change_case_misc_lower_tl on line ...
Defining \tl_log:N on line ...
Defining \tl_log:c on line ...
Defining \tl_log:n on line ...
+Defining \char_set_active_eq:nN on line ...
Defining \char_set_active_eq:NN on line ...
+Defining \char_gset_active_eq:nN on line ...
Defining \char_gset_active_eq:NN on line ...
Defining \__peek_execute_branches_N_type: on line ...
Defining \__peek_N_type:w on line ...
diff --git a/l3kernel/testfiles/m3expl001.xetex.tlg b/l3kernel/testfiles/m3expl001.xetex.tlg
index d9f9e72..f476428 100644
--- a/l3kernel/testfiles/m3expl001.xetex.tlg
+++ b/l3kernel/testfiles/m3expl001.xetex.tlg
@@ -4203,7 +4203,9 @@ Defining \c__tl_change_case_misc_lower_tl on line ...
Defining \tl_log:N on line ...
Defining \tl_log:c on line ...
Defining \tl_log:n on line ...
+Defining \char_set_active_eq:nN on line ...
Defining \char_set_active_eq:NN on line ...
+Defining \char_gset_active_eq:nN on line ...
Defining \char_gset_active_eq:NN on line ...
Defining \__peek_execute_branches_N_type: on line ...
Defining \__peek_N_type:w on line ...
diff --git a/l3kernel/testfiles/m3expl003.luatex.tlg b/l3kernel/testfiles/m3expl003.luatex.tlg
index 0f633b2..8df1e7a 100644
--- a/l3kernel/testfiles/m3expl003.luatex.tlg
+++ b/l3kernel/testfiles/m3expl003.luatex.tlg
@@ -4205,7 +4205,9 @@ Defining \c__tl_change_case_misc_lower_tl on line ...
Defining \tl_log:N on line ...
Defining \tl_log:c on line ...
Defining \tl_log:n on line ...
+Defining \char_set_active_eq:nN on line ...
Defining \char_set_active_eq:NN on line ...
+Defining \char_gset_active_eq:nN on line ...
Defining \char_gset_active_eq:NN on line ...
Defining \__peek_execute_branches_N_type: on line ...
Defining \__peek_N_type:w on line ...
diff --git a/l3kernel/testfiles/m3expl003.tlg b/l3kernel/testfiles/m3expl003.tlg
index e077f6c..84ee247 100644
--- a/l3kernel/testfiles/m3expl003.tlg
+++ b/l3kernel/testfiles/m3expl003.tlg
@@ -4204,7 +4204,9 @@ Defining \c__tl_change_case_misc_lower_tl on line ...
Defining \tl_log:N on line ...
Defining \tl_log:c on line ...
Defining \tl_log:n on line ...
+Defining \char_set_active_eq:nN on line ...
Defining \char_set_active_eq:NN on line ...
+Defining \char_gset_active_eq:nN on line ...
Defining \char_gset_active_eq:NN on line ...
Defining \__peek_execute_branches_N_type: on line ...
Defining \__peek_N_type:w on line ...
diff --git a/l3kernel/testfiles/m3expl003.xetex.tlg b/l3kernel/testfiles/m3expl003.xetex.tlg
index 1f0d6c4..e97ed47 100644
--- a/l3kernel/testfiles/m3expl003.xetex.tlg
+++ b/l3kernel/testfiles/m3expl003.xetex.tlg
@@ -4204,7 +4204,9 @@ Defining \c__tl_change_case_misc_lower_tl on line ...
Defining \tl_log:N on line ...
Defining \tl_log:c on line ...
Defining \tl_log:n on line ...
+Defining \char_set_active_eq:nN on line ...
Defining \char_set_active_eq:NN on line ...
+Defining \char_gset_active_eq:nN on line ...
Defining \char_gset_active_eq:NN on line ...
Defining \__peek_execute_branches_N_type: on line ...
Defining \__peek_N_type:w on line ...
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the latex3-commits
mailing list