Skip to content

Commit

Permalink
Deprecate global msg setting
Browse files Browse the repository at this point in the history
  • Loading branch information
josephwright committed Feb 13, 2024
1 parent 8e3a075 commit 4894909
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 14 deletions.
1 change: 1 addition & 0 deletions l3kernel/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ this project uses date-based 'snapshot' version identifiers.

### Deprecated
- `\keys_set_filter:nnn(nN)` in favor of `\keys_set_exclude_groups:nnn(nN)`
- `\msg_gset:nnn(n)`

## [2024-01-04]

Expand Down
2 changes: 2 additions & 0 deletions l3kernel/doc/l3obsolete.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ Function Date deprecated
\l_keys_path_tl 2020-02-08
\l_text_accents_tl 2023-02-07
\l_text_letterlike_tl 2023-02-07
\msg_gset:nnn 2024-01-11
\msg_gset:nnnn 2024-01-11
\peek_catcode_ignore_spaces:N 2022-01-11
\peek_catcode_remove_ignore_spaces:N 2022-01-11
\peek_charcode_ignore_spaces:N 2022-01-11
Expand Down
15 changes: 15 additions & 0 deletions l3kernel/l3deprecation.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,21 @@
% \end{macro}
% \end{macro}
%
% \subsection{Deprecated \pkg{l3msg} functions}
%
% \begin{macrocode}
%<@@=msg>
% \end{macrocode}
%
% \begin{macro}[deprecated]{\msg_gset:nnnn, \msg_gset:nnn}
% \begin{macrocode}
\__kernel_patch_deprecation:nnNNpn { 2024-01-17 } { \msg_set:nnnn }
\cs_new_protected:Npn \msg_gset:nnnn { \msg_set:nnnn }
\__kernel_patch_deprecation:nnNNpn { 2024-01-17 } { \msg_set:nnn }
\cs_new_protected:Npn \msg_gset:nnn { \msg_set:nnn }
% \end{macrocode}
% \end{macro}
%
% \subsection{Deprecated \pkg{l3pdf} functions}
%
% \begin{macrocode}
Expand Down
20 changes: 6 additions & 14 deletions l3kernel/l3msg.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
% used. An error is raised if the \meta{message} already exists.
% \end{function}
%
% \begin{function}{\msg_set:nnnn, \msg_set:nnn, \msg_gset:nnnn, \msg_gset:nnn}
% \begin{function}{\msg_set:nnnn, \msg_set:nnn}
% \begin{syntax}
% \cs{msg_set:nnnn} \Arg{module} \Arg{message} \Arg{text} \Arg{more text}
% \end{syntax}
Expand Down Expand Up @@ -809,15 +809,17 @@
% \msg_new:nnnn, \msg_new:nnee, \msg_new:nnxx,
% \msg_new:nnn, \msg_new:nne, \msg_new:nnx
% }
% \begin{macro}{\msg_gset:nnnn, \msg_gset:nnn}
% \begin{macro}{\msg_set:nnnn, \msg_set:nnn}
% Setting a message simply means saving the appropriate text
% into two functions. A sanity check first.
% \begin{macrocode}
\cs_new_protected:Npn \msg_new:nnnn #1#2
\cs_new_protected:Npn \msg_new:nnnn #1#2#3#4
{
\@@_chk_free:nn {#1} {#2}
\msg_gset:nnnn {#1} {#2}
\cs_gset:cpn { \c_@@_text_prefix_tl #1 / #2 }
##1##2##3##4 {#3}
\cs_gset:cpn { \c_@@_more_text_prefix_tl #1 / #2 }
##1##2##3##4 {#4}
}
\cs_generate_variant:Nn \msg_new:nnnn { nnee , nnxx }
\cs_new_protected:Npn \msg_new:nnn #1#2#3
Expand All @@ -832,19 +834,9 @@
}
\cs_new_protected:Npn \msg_set:nnn #1#2#3
{ \msg_set:nnnn {#1} {#2} {#3} { } }
\cs_new_protected:Npn \msg_gset:nnnn #1#2#3#4
{
\cs_gset:cpn { \c_@@_text_prefix_tl #1 / #2 }
##1##2##3##4 {#3}
\cs_gset:cpn { \c_@@_more_text_prefix_tl #1 / #2 }
##1##2##3##4 {#4}
}
\cs_new_protected:Npn \msg_gset:nnn #1#2#3
{ \msg_gset:nnnn {#1} {#2} {#3} { } }
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsection{Messages: support functions and text}
%
Expand Down

0 comments on commit 4894909

Please sign in to comment.