[latex3-commits] [git/LaTeX3-latex3-latex3] master: New \msg_module_type:n (aca524e)

Joseph Wright joseph.wright at morningstar2.co.uk
Thu Oct 11 09:20:04 CEST 2018


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

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

commit aca524e9a6bd340c0100ac606547b4d9a4064413
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed Oct 10 10:05:31 2018 +0100

    New \msg_module_type:n


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

aca524e9a6bd340c0100ac606547b4d9a4064413
 l3kernel/l3msg.dtx                      |   42 +++++++++++++++++++++++++++++--
 l3kernel/testfiles/m3expl001.luatex.tlg |    2 ++
 l3kernel/testfiles/m3expl001.ptex.tlg   |    2 ++
 l3kernel/testfiles/m3expl001.tlg        |    2 ++
 l3kernel/testfiles/m3expl001.uptex.tlg  |    2 ++
 l3kernel/testfiles/m3expl001.xetex.tlg  |    2 ++
 l3kernel/testfiles/m3expl003.luatex.tlg |    2 ++
 l3kernel/testfiles/m3expl003.ptex.tlg   |    2 ++
 l3kernel/testfiles/m3expl003.tlg        |    2 ++
 l3kernel/testfiles/m3expl003.uptex.tlg  |    2 ++
 l3kernel/testfiles/m3expl003.xetex.tlg  |    2 ++
 11 files changed, 60 insertions(+), 2 deletions(-)

diff --git a/l3kernel/l3msg.dtx b/l3kernel/l3msg.dtx
index c09ddad..22fde29 100644
--- a/l3kernel/l3msg.dtx
+++ b/l3kernel/l3msg.dtx
@@ -220,6 +220,16 @@
 %   unchanged).
 % \end{function}
 %
+% \begin{function}[EXP, added = 2019-10-10]{\msg_module_type:n}
+%   \begin{syntax}
+%     \cs{msg_module_type:n} \Arg{module}
+%   \end{syntax}
+%   Expands to the description which applies to the \meta{module},
+%   for example a |Package| or |Class|. The information here is defined
+%   in \cs{g_msg_module_type_prop}, and will default to |Package| if an
+%   entry is not present.
+% \end{function}
+%
 % \begin{function}[EXP,updated = 2018-09-30]{\msg_see_documentation_text:n}
 %   \begin{syntax}
 %     \cs{msg_see_documentation_text:n} \Arg{module}
@@ -242,6 +252,13 @@
 %   the reserved |LaTeX| tree, but are printed as |LaTeX3|.
 % \end{variable}
 %
+% \begin{variable}[added = 2018-10-10]{\g_msg_module_type_prop}
+%   Provides a mapping between the module name used for messages, and that
+%   type of module. For example, for \LaTeX{}3 core messages, an empty entry
+%   is set here meaning that they are not described using the standard
+%   |Package| text.
+% \end{variable}
+%
 % \section{Issuing messages}
 %
 % Messages behave differently depending on the message class. In all cases,
@@ -894,14 +911,35 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{variable}{\g_msg_module_name_prop}
-%   For storing public module names
+% \begin{variable}{\g_msg_module_name_prop, \g_msg_module_type_prop}
+%   For storing public module information: the kernel data is set up
+%   in advance.
 %    \begin{macrocode}
 \prop_new:N \g_msg_module_name_prop
 \prop_gput:Nnn \g_msg_module_name_prop { LaTeX } { LaTeX3 }
+\prop_new:N \g_msg_module_type_prop
+\prop_gput:Nnn \g_msg_module_type_prop { LaTeX } { }
 %    \end{macrocode}
 % \end{variable}
 %
+% \begin{macro}[EXP]{\msg_moudle_type:n}
+%   Contextual footer information, with the potential to give modules an
+%   alternative name.
+%    \begin{macrocode}
+\cs_new:Npn \msg_module_type:n #1
+  {
+    \prop_if_in:NnTF \g_msg_module_type_prop {#1}
+      { \prop_item:Nn \g_msg_module_type_prop {#1} }
+%<*initex>
+      { Module }
+%</initex>
+%<*package>
+      { Package }
+%</package>
+  }
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}[EXP]{\msg_moudle_name:n, \msg_see_documentation_text:n}
 %   Contextual footer information, with the potential to give modules an
 %   alternative name.
diff --git a/l3kernel/testfiles/m3expl001.luatex.tlg b/l3kernel/testfiles/m3expl001.luatex.tlg
index a5e371a..4fdfb22 100644
--- a/l3kernel/testfiles/m3expl001.luatex.tlg
+++ b/l3kernel/testfiles/m3expl001.luatex.tlg
@@ -2493,6 +2493,8 @@ 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_name_prop on line ...
+Defining \g_msg_module_type_prop on line ...
+Defining \msg_module_type:n 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 ...
diff --git a/l3kernel/testfiles/m3expl001.ptex.tlg b/l3kernel/testfiles/m3expl001.ptex.tlg
index 60d59e1..90f0d4b 100644
--- a/l3kernel/testfiles/m3expl001.ptex.tlg
+++ b/l3kernel/testfiles/m3expl001.ptex.tlg
@@ -2785,6 +2785,8 @@ 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_name_prop on line ...
+Defining \g_msg_module_type_prop on line ...
+Defining \msg_module_type:n 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 ...
diff --git a/l3kernel/testfiles/m3expl001.tlg b/l3kernel/testfiles/m3expl001.tlg
index 6033aab..2a5d63a 100644
--- a/l3kernel/testfiles/m3expl001.tlg
+++ b/l3kernel/testfiles/m3expl001.tlg
@@ -2785,6 +2785,8 @@ 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_name_prop on line ...
+Defining \g_msg_module_type_prop on line ...
+Defining \msg_module_type:n 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 ...
diff --git a/l3kernel/testfiles/m3expl001.uptex.tlg b/l3kernel/testfiles/m3expl001.uptex.tlg
index df95295..9cd0129 100644
--- a/l3kernel/testfiles/m3expl001.uptex.tlg
+++ b/l3kernel/testfiles/m3expl001.uptex.tlg
@@ -2785,6 +2785,8 @@ 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_name_prop on line ...
+Defining \g_msg_module_type_prop on line ...
+Defining \msg_module_type:n 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 ...
diff --git a/l3kernel/testfiles/m3expl001.xetex.tlg b/l3kernel/testfiles/m3expl001.xetex.tlg
index f97e8e6..7fb777b 100644
--- a/l3kernel/testfiles/m3expl001.xetex.tlg
+++ b/l3kernel/testfiles/m3expl001.xetex.tlg
@@ -2530,6 +2530,8 @@ 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_name_prop on line ...
+Defining \g_msg_module_type_prop on line ...
+Defining \msg_module_type:n 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 ...
diff --git a/l3kernel/testfiles/m3expl003.luatex.tlg b/l3kernel/testfiles/m3expl003.luatex.tlg
index a5e371a..4fdfb22 100644
--- a/l3kernel/testfiles/m3expl003.luatex.tlg
+++ b/l3kernel/testfiles/m3expl003.luatex.tlg
@@ -2493,6 +2493,8 @@ 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_name_prop on line ...
+Defining \g_msg_module_type_prop on line ...
+Defining \msg_module_type:n 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 ...
diff --git a/l3kernel/testfiles/m3expl003.ptex.tlg b/l3kernel/testfiles/m3expl003.ptex.tlg
index 60d59e1..90f0d4b 100644
--- a/l3kernel/testfiles/m3expl003.ptex.tlg
+++ b/l3kernel/testfiles/m3expl003.ptex.tlg
@@ -2785,6 +2785,8 @@ 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_name_prop on line ...
+Defining \g_msg_module_type_prop on line ...
+Defining \msg_module_type:n 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 ...
diff --git a/l3kernel/testfiles/m3expl003.tlg b/l3kernel/testfiles/m3expl003.tlg
index 6033aab..2a5d63a 100644
--- a/l3kernel/testfiles/m3expl003.tlg
+++ b/l3kernel/testfiles/m3expl003.tlg
@@ -2785,6 +2785,8 @@ 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_name_prop on line ...
+Defining \g_msg_module_type_prop on line ...
+Defining \msg_module_type:n 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 ...
diff --git a/l3kernel/testfiles/m3expl003.uptex.tlg b/l3kernel/testfiles/m3expl003.uptex.tlg
index df95295..9cd0129 100644
--- a/l3kernel/testfiles/m3expl003.uptex.tlg
+++ b/l3kernel/testfiles/m3expl003.uptex.tlg
@@ -2785,6 +2785,8 @@ 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_name_prop on line ...
+Defining \g_msg_module_type_prop on line ...
+Defining \msg_module_type:n 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 ...
diff --git a/l3kernel/testfiles/m3expl003.xetex.tlg b/l3kernel/testfiles/m3expl003.xetex.tlg
index f97e8e6..7fb777b 100644
--- a/l3kernel/testfiles/m3expl003.xetex.tlg
+++ b/l3kernel/testfiles/m3expl003.xetex.tlg
@@ -2530,6 +2530,8 @@ 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_name_prop on line ...
+Defining \g_msg_module_type_prop on line ...
+Defining \msg_module_type:n 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 ...





More information about the latex3-commits mailing list