[latex3-commits] [git/LaTeX3-latex3-latex2e] hotfix/gh441: Test if exist rather than if empty (b11dabb4)

Frank Mittelbach frank.mittelbach at latex-project.org
Sat Dec 12 10:57:35 CET 2020


Am 11.12.20 um 19:37 schrieb PhelypeOleinik:
> Repository : https://github.com/latex3/latex2e
> On branch  : hotfix/gh441
> Link       : https://github.com/latex3/latex2e/commit/b11dabb4d386c233c37acc7723a2c1a78a61f933
> 
>> ---------------------------------------------------------------
> 
> commit b11dabb4d386c233c37acc7723a2c1a78a61f933
> Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
> Date:   Fri Dec 11 15:37:33 2020 -0300
> 
>      Test if exist rather than if empty
> 
> 
>> ---------------------------------------------------------------
> 
> b11dabb4d386c233c37acc7723a2c1a78a61f933
>   base/lthooks.dtx                       | 8 ++++++--
>   base/testfiles-lthooks/lthooks-019.tlg | 2 +-
>   2 files changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/base/lthooks.dtx b/base/lthooks.dtx
> index 4bcc3e13..8822715f 100644
> --- a/base/lthooks.dtx
> +++ b/base/lthooks.dtx
> @@ -1938,8 +1938,12 @@
>   %    If there was already code in the |top-level| chunk, then reverse it
>   %    (see definition of \cs{@@_hook_gput_code_do:nnn}).
>   %    \begin{macrocode}
> -    \tl_if_empty:cF { @@_toplevel~#1 }
> -      { \tl_reverse:c { @@_toplevel~#1 } }
> +    \tl_if_exist:cT { @@_toplevel~#1 }
> +      {
> +        \debug_suspend:
> +        \tl_greverse:c { @@_toplevel~#1 }
> +        \debug_resume:
> +      }

wait a second Phelype. Are you proposing to reverse the code inside the 
top-level code itself? Or am I  misreading this?

If I'm not in favor of doing that. I think we should not deviate from 
the simple rule that within one label code is *always* added in the 
order given (even for reversed hooks).

frank



More information about the latex3-commits mailing list.