[latex3-commits] [git/LaTeX3-latex3-latex3] master: Generalise message module <-> name concept (b410f37)

Joseph Wright joseph.wright at morningstar2.co.uk
Wed Oct 10 10:25:45 CEST 2018


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/b410f37c020d9217a5c4a2c6b66281f3ddbca9f5

>---------------------------------------------------------------

commit b410f37c020d9217a5c4a2c6b66281f3ddbca9f5
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed Oct 10 09:20:39 2018 +0100

    Generalise message module <-> name concept


>---------------------------------------------------------------

b410f37c020d9217a5c4a2c6b66281f3ddbca9f5
 l3kernel/l3msg.dtx                      |   31 ++++++++++++++++++++++---------
 l3kernel/testfiles/m3expl001.luatex.tlg |    3 ++-
 l3kernel/testfiles/m3expl001.ptex.tlg   |    3 ++-
 l3kernel/testfiles/m3expl001.tlg        |    3 ++-
 l3kernel/testfiles/m3expl001.uptex.tlg  |    3 ++-
 l3kernel/testfiles/m3expl001.xetex.tlg  |    3 ++-
 l3kernel/testfiles/m3expl003.luatex.tlg |    3 ++-
 l3kernel/testfiles/m3expl003.ptex.tlg   |    3 ++-
 l3kernel/testfiles/m3expl003.tlg        |    3 ++-
 l3kernel/testfiles/m3expl003.uptex.tlg  |    3 ++-
 l3kernel/testfiles/m3expl003.xetex.tlg  |    3 ++-
 11 files changed, 42 insertions(+), 19 deletions(-)

diff --git a/l3kernel/l3msg.dtx b/l3kernel/l3msg.dtx
index 5698348..c09ddad 100644
--- a/l3kernel/l3msg.dtx
+++ b/l3kernel/l3msg.dtx
@@ -211,6 +211,15 @@
 %   be included.
 % \end{function}
 %
+% \begin{function}[EXP, added = 2019-10-10]{\msg_module_name:n}
+%   \begin{syntax}
+%     \cs{msg_module_name:n} \Arg{module}
+%   \end{syntax}
+%   Expands to the public name of the \meta{module} as defined by
+%   \cs{g_msg_module_name_prop} (or otherwise leaves the \meta{module}
+%   unchanged).
+% \end{function}
+%
 % \begin{function}[EXP,updated = 2018-09-30]{\msg_see_documentation_text:n}
 %   \begin{syntax}
 %     \cs{msg_see_documentation_text:n} \Arg{module}
@@ -227,7 +236,7 @@
 %   \cs{g_msg_module_documentation_prop}
 % \end{function}
 %
-% \begin{variable}{\g_msg_module_documentation_prop}
+% \begin{variable}[added = 2018-10-10]{\g_msg_module_name_prop}
 %   Provides a mapping between the module name used for messages, and that
 %   for documentation. For example, \LaTeX{}3 core messages are stored in
 %   the reserved |LaTeX| tree, but are printed as |LaTeX3|.
@@ -885,23 +894,27 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{variable}{\g_msg_module_documentation_prop}
+% \begin{variable}{\g_msg_module_name_prop}
+%   For storing public module names
 %    \begin{macrocode}
-\prop_new:N \g_msg_module_documentation_prop
-\prop_gput:Nnn \g_msg_module_documentation_prop { LaTeX } { LaTeX3 }
+\prop_new:N \g_msg_module_name_prop
+\prop_gput:Nnn \g_msg_module_name_prop { LaTeX } { LaTeX3 }
 %    \end{macrocode}
 % \end{variable}
 %
-% \begin{macro}{\msg_see_documentation_text:n}
+% \begin{macro}[EXP]{\msg_moudle_name:n, \msg_see_documentation_text:n}
 %   Contextual footer information, with the potential to give modules an
 %   alternative name.
 %    \begin{macrocode}
+\cs_new:Npn \msg_module_name:n #1
+  {
+    \prop_if_in:NnTF \g_msg_module_name_prop {#1}
+      { \prop_item:Nn \g_msg_module_name_prop {#1} }
+      {#1}
+  }
 \cs_new:Npn \msg_see_documentation_text:n #1
   {
-    \\ \\ See~the~
-    \prop_if_in:NnTF \g_msg_module_documentation_prop {#1}
-      { \prop_item:Nn \g_msg_module_documentation_prop {#1} }
-      {#1} ~
+    \\ \\ See~the~ \msg_module_name:n {#1} ~
     documentation~for~further~information.
   }
 %    \end{macrocode}
diff --git a/l3kernel/testfiles/m3expl001.luatex.tlg b/l3kernel/testfiles/m3expl001.luatex.tlg
index 8119e90..a5e371a 100644
--- a/l3kernel/testfiles/m3expl001.luatex.tlg
+++ b/l3kernel/testfiles/m3expl001.luatex.tlg
@@ -2492,7 +2492,8 @@ Defining \msg_critical_text:n on line ...
 Defining \msg_error_text:n on line ...
 Defining \msg_warning_text:n on line ...
 Defining \msg_info_text:n on line ...
-Defining \g_msg_module_documentation_prop on line ...
+Defining \g_msg_module_name_prop on line ...
+Defining \msg_module_name:n on line ...
 Defining \msg_see_documentation_text:n on line ...
 Defining \l__msg_redirect_fatal_prop on line ...
 Defining \__msg_fatal_code:nnnnnn on line ...
diff --git a/l3kernel/testfiles/m3expl001.ptex.tlg b/l3kernel/testfiles/m3expl001.ptex.tlg
index c7a870f..60d59e1 100644
--- a/l3kernel/testfiles/m3expl001.ptex.tlg
+++ b/l3kernel/testfiles/m3expl001.ptex.tlg
@@ -2784,7 +2784,8 @@ Defining \msg_critical_text:n on line ...
 Defining \msg_error_text:n on line ...
 Defining \msg_warning_text:n on line ...
 Defining \msg_info_text:n on line ...
-Defining \g_msg_module_documentation_prop on line ...
+Defining \g_msg_module_name_prop on line ...
+Defining \msg_module_name:n on line ...
 Defining \msg_see_documentation_text:n on line ...
 Defining \l__msg_redirect_fatal_prop on line ...
 Defining \__msg_fatal_code:nnnnnn on line ...
diff --git a/l3kernel/testfiles/m3expl001.tlg b/l3kernel/testfiles/m3expl001.tlg
index a4ae62d..6033aab 100644
--- a/l3kernel/testfiles/m3expl001.tlg
+++ b/l3kernel/testfiles/m3expl001.tlg
@@ -2784,7 +2784,8 @@ Defining \msg_critical_text:n on line ...
 Defining \msg_error_text:n on line ...
 Defining \msg_warning_text:n on line ...
 Defining \msg_info_text:n on line ...
-Defining \g_msg_module_documentation_prop on line ...
+Defining \g_msg_module_name_prop on line ...
+Defining \msg_module_name:n on line ...
 Defining \msg_see_documentation_text:n on line ...
 Defining \l__msg_redirect_fatal_prop on line ...
 Defining \__msg_fatal_code:nnnnnn on line ...
diff --git a/l3kernel/testfiles/m3expl001.uptex.tlg b/l3kernel/testfiles/m3expl001.uptex.tlg
index 140c11b..df95295 100644
--- a/l3kernel/testfiles/m3expl001.uptex.tlg
+++ b/l3kernel/testfiles/m3expl001.uptex.tlg
@@ -2784,7 +2784,8 @@ Defining \msg_critical_text:n on line ...
 Defining \msg_error_text:n on line ...
 Defining \msg_warning_text:n on line ...
 Defining \msg_info_text:n on line ...
-Defining \g_msg_module_documentation_prop on line ...
+Defining \g_msg_module_name_prop on line ...
+Defining \msg_module_name:n on line ...
 Defining \msg_see_documentation_text:n on line ...
 Defining \l__msg_redirect_fatal_prop on line ...
 Defining \__msg_fatal_code:nnnnnn on line ...
diff --git a/l3kernel/testfiles/m3expl001.xetex.tlg b/l3kernel/testfiles/m3expl001.xetex.tlg
index 164180b..f97e8e6 100644
--- a/l3kernel/testfiles/m3expl001.xetex.tlg
+++ b/l3kernel/testfiles/m3expl001.xetex.tlg
@@ -2529,7 +2529,8 @@ Defining \msg_critical_text:n on line ...
 Defining \msg_error_text:n on line ...
 Defining \msg_warning_text:n on line ...
 Defining \msg_info_text:n on line ...
-Defining \g_msg_module_documentation_prop on line ...
+Defining \g_msg_module_name_prop on line ...
+Defining \msg_module_name:n on line ...
 Defining \msg_see_documentation_text:n on line ...
 Defining \l__msg_redirect_fatal_prop on line ...
 Defining \__msg_fatal_code:nnnnnn on line ...
diff --git a/l3kernel/testfiles/m3expl003.luatex.tlg b/l3kernel/testfiles/m3expl003.luatex.tlg
index 8119e90..a5e371a 100644
--- a/l3kernel/testfiles/m3expl003.luatex.tlg
+++ b/l3kernel/testfiles/m3expl003.luatex.tlg
@@ -2492,7 +2492,8 @@ Defining \msg_critical_text:n on line ...
 Defining \msg_error_text:n on line ...
 Defining \msg_warning_text:n on line ...
 Defining \msg_info_text:n on line ...
-Defining \g_msg_module_documentation_prop on line ...
+Defining \g_msg_module_name_prop on line ...
+Defining \msg_module_name:n on line ...
 Defining \msg_see_documentation_text:n on line ...
 Defining \l__msg_redirect_fatal_prop on line ...
 Defining \__msg_fatal_code:nnnnnn on line ...
diff --git a/l3kernel/testfiles/m3expl003.ptex.tlg b/l3kernel/testfiles/m3expl003.ptex.tlg
index c7a870f..60d59e1 100644
--- a/l3kernel/testfiles/m3expl003.ptex.tlg
+++ b/l3kernel/testfiles/m3expl003.ptex.tlg
@@ -2784,7 +2784,8 @@ Defining \msg_critical_text:n on line ...
 Defining \msg_error_text:n on line ...
 Defining \msg_warning_text:n on line ...
 Defining \msg_info_text:n on line ...
-Defining \g_msg_module_documentation_prop on line ...
+Defining \g_msg_module_name_prop on line ...
+Defining \msg_module_name:n on line ...
 Defining \msg_see_documentation_text:n on line ...
 Defining \l__msg_redirect_fatal_prop on line ...
 Defining \__msg_fatal_code:nnnnnn on line ...
diff --git a/l3kernel/testfiles/m3expl003.tlg b/l3kernel/testfiles/m3expl003.tlg
index a4ae62d..6033aab 100644
--- a/l3kernel/testfiles/m3expl003.tlg
+++ b/l3kernel/testfiles/m3expl003.tlg
@@ -2784,7 +2784,8 @@ Defining \msg_critical_text:n on line ...
 Defining \msg_error_text:n on line ...
 Defining \msg_warning_text:n on line ...
 Defining \msg_info_text:n on line ...
-Defining \g_msg_module_documentation_prop on line ...
+Defining \g_msg_module_name_prop on line ...
+Defining \msg_module_name:n on line ...
 Defining \msg_see_documentation_text:n on line ...
 Defining \l__msg_redirect_fatal_prop on line ...
 Defining \__msg_fatal_code:nnnnnn on line ...
diff --git a/l3kernel/testfiles/m3expl003.uptex.tlg b/l3kernel/testfiles/m3expl003.uptex.tlg
index 140c11b..df95295 100644
--- a/l3kernel/testfiles/m3expl003.uptex.tlg
+++ b/l3kernel/testfiles/m3expl003.uptex.tlg
@@ -2784,7 +2784,8 @@ Defining \msg_critical_text:n on line ...
 Defining \msg_error_text:n on line ...
 Defining \msg_warning_text:n on line ...
 Defining \msg_info_text:n on line ...
-Defining \g_msg_module_documentation_prop on line ...
+Defining \g_msg_module_name_prop on line ...
+Defining \msg_module_name:n on line ...
 Defining \msg_see_documentation_text:n on line ...
 Defining \l__msg_redirect_fatal_prop on line ...
 Defining \__msg_fatal_code:nnnnnn on line ...
diff --git a/l3kernel/testfiles/m3expl003.xetex.tlg b/l3kernel/testfiles/m3expl003.xetex.tlg
index 164180b..f97e8e6 100644
--- a/l3kernel/testfiles/m3expl003.xetex.tlg
+++ b/l3kernel/testfiles/m3expl003.xetex.tlg
@@ -2529,7 +2529,8 @@ Defining \msg_critical_text:n on line ...
 Defining \msg_error_text:n on line ...
 Defining \msg_warning_text:n on line ...
 Defining \msg_info_text:n on line ...
-Defining \g_msg_module_documentation_prop on line ...
+Defining \g_msg_module_name_prop on line ...
+Defining \msg_module_name:n on line ...
 Defining \msg_see_documentation_text:n on line ...
 Defining \l__msg_redirect_fatal_prop on line ...
 Defining \__msg_fatal_code:nnnnnn on line ...





More information about the latex3-commits mailing list