%D \module
%D   [       file=sort-ini,
%D        version=2005.08.08,
%D          title=\CONTEXT\ Sort Macros,
%D       subtitle=Initialization,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

%D This module replaces existing sort key handling and is meant to be
%D used with the new texutil functionality. This module defines a few
%D auxiliary macros.

\writestatus{loading}{Context Sorting Macros (ini)}

\newevery \everysavesortkeys \relax

\def\savesortkeys
  {\ifproductionrun
     \the\everysavesortkeys
     \global\everysavesortkeys\emptytoks
   \fi}

\appendtoks \savesortkeys \to \everyshipout

\loadmarkfile{sort-ini}

\endinput
