Skip to main content

provide_only_declines

Function provide_only_declines 

Source
pub fn provide_only_declines(token: &Token) -> bool
Expand description

Does a provide-only load (ProvideOnlyGuard) decline this definition of token? While the guard lives, a binding’s definition (DefinitionOrigin::Binding, Fallback or Borrowed: OmniBus and every binding it requires, inst_support’s \author[]{} and epsf’s \epsfbox among them) is declined when the name was defined before the guard: defined now in the \providecommand sense (latex.ltx \@ifundefined: a meaning other than \relax, binding::def::dialect::is_defined_token), not a fallback guess (is_fallback_meaning), and not assigned since the guard began (provide_only_assigned: the load’s own names, which it may define again — OmniBus’s \keywords{} before its \keywords that also opens {keywords}). An environment \begin{X}/\end{X} counts as defined when \X is (latex.ltx \begin runs \X), and \end{X} also when \endX is. The binding definers (def_macro, def_primitive, def_constructor, def_register, def_conditional, def_environment, def_math) and Let! consult it before they assign anything; TeX’s own \def/\let do not, so TeX code run during the load keeps its usual effect (a hook appended to, a scratch macro), nor does the loader’s bookkeeping, made at its caller’s origin. A macro marked extends (it wraps and delegates to the name’s current meaning) is not declined.