<div dir="auto"><div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">+\ExplSyntaxOn<br>
+\def\@execute@begin@hook #1{<br>
+  \expandafter\ifx\csname #1\endcsname\document<br>
+    \endgroup<br>
+    \gdef\@execute@begin@hook##1{\UseHook{env/##1/begin}}<br>
+    \__hook_initialize_all:<br>
+  \fi<br></blockquote></div><div dir="auto"><br></div><div dir="auto">Is \__hook_initialize_all: used here only? (can't check now) If so, perhaps we could rename it \@hook@initialize@all@@ or something like that and avoid mixing syntaxes here... </div><div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div>