Debian Codegraph @

texmf-dist/tex/context/third/memoize/t-nomemoize.tex

raw
1 %%
2 %% This is file `t-nomemoize.tex',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% memoize.dtx (with options: `nommz,context')
8 %%
9 %% This file is a part of Memoize, a TeX package for externalization of
10 %% graphics and memoization of compilation results in general, available at
11 %% https://ctan.org/pkg/memoize and https://github.com/sasozivanovic/memoize.
12 %%
13 %% Copyright (c) 2020- Saso Zivanovic <[email protected]>
14 %% (Sa\v{s}o \v{Z}ivanovi\'{c})
15 %%
16 %% This work may be distributed and/or modified under the conditions of the
17 %% LaTeX Project Public License, either version 1.3c of this license or (at
18 %% your option) any later version. The latest version of this license is in
19 %% https://www.latex-project.org/lppl.txt and version 1.3c or later is part of
20 %% all distributions of LaTeX version 2008 or later.
21 %%
22 %% This work has the LPPL maintenance status `maintained'.
23 %% The Current Maintainer of this work is Saso Zivanovic.
24 %%
25 %% The files belonging to this work and covered by LPPL are listed in
26 %% (<texmf>/doc/generic/memoize/)FILES.
27 %D \module[
28 %D file=t-nomemoize.tex,
29 %D version=1.4.1,
30 %D title=Memoize,
31 %D subtitle=A no-op stub for Memoize,
32 %D author=Saso Zivanovic,
33 %D date=2024-12-02,
34 %D copyright=Saso Zivanovic,
35 %D license=LPPL,
36 %D ]
37 \writestatus{loading}{ConTeXt User Module / nomemoize}
38 \unprotect
39 \startmodule[nomemoize]
40 \input miniltx
41 \input t-pgfkey
42 \def\ifmmz@loadstatus#1{%
43 \ifnum#1=0\csname mmz@loadstatus\endcsname\relax
44 \expandafter\@firstoftwo
45 \else
46 \expandafter\@secondoftwo
47 \fi
48 }
49 \ifmmz@loadstatus{1}{%
50 \PackageError{nomemoize}{Cannot load the package, as "memoize" is already
51 loaded; memoization will remain in effect}{Packages "memoize" and
52 "nomemoize" are mutually exclusive, please load either one or the other.}%
53 \endinput }{}%
54 \ifmmz@loadstatus{2}{%
55 \PackageError{nomemoize}{Cannot load the package, as "memoizable" is already
56 loaded}{Package "memoizable" is loaded by packages which support
57 memoization. (No)Memoize must be loaded before all such packages. The
58 compilation log can help you figure out which package loaded
59 "memoizable"; please move
60 "\string\usemodule[memoize]"
61 before the
62 "\string\usemodule"
63 of that package.}%
64 \endinput
65 }{}%
66 \ifmmz@loadstatus{3}{\endinput}{}%
67 \def\mmz@loadstatus{3}%
68 \def\mmzset#1{\ignorespaces}
69 \def\nommzkeys{\pgfqkeys{/mmz}}
70 \pgfqkeys{/mmz}{.unknown/.code={\pgfkeysdef{\pgfkeyscurrentkey}{}}}
71 \newif\ifmemoize
72 \protected\def\nommz#1#{%
73 \afterassignment\nommz@i
74 \let\mmz@temp
75 }
76 \def\nommz@i{%
77 \bgroup
78 \memoizefalse
79 }
80 \let\mmz\nommz
81 \def\startnomemoize{%
82 \begingroup
83 \memoizefalse
84 \futurelet\mmz@temp\nommz@env@i
85 }
86 \def\nommz@env@i{%
87 \ifx\mmz@temp[%]
88 \expandafter\nommz@env@ii
89 \fi
90 }
91 \def\nommz@env@ii[#1]{%
92 \ignorespaces
93 }
94 \def\stopnomemoize{%
95 \endgroup
96 \unskip
97 }
98 \let\startmemoize\startnomemoize
99 \let\stopmemoize\stopnomemoize
100 \newif\ifmemoizing
101 \newif\ifinmemoize
102 \def\mmznext#1{\ignorespaces}
103 \InputIfFileExists{memoize.cfg}{}{}
104 \pgfkeys{%
105 /handlers/.meaning to context/.code={},
106 /handlers/.value to context/.code={},
107 }
108 \let\mmzAbort\relax
109 \let\mmzUnmemoizable\relax
110 \newcommand\IfMemoizing[2][]{\@secondoftwo}
111 \let\mmzNoRef\@gobble
112 \let\mmzForceNoRef\@gobble
113 \newtoks\mmzContext
114 \newtoks\mmzContextExtra
115 \newtoks\mmzCMemo
116 \newtoks\mmzCCMemo
117 \newcount\mmzExternPages
118 \newcount\mmzExtraPages
119 \let\mmzTracingOn\relax
120 \let\mmzTracingOff\relax
121 \stopmodule
122 \protect
123 \endinput
124 %%
125 %% End of file `t-nomemoize.tex'.