% $Id: etoolbox.def,v 1.7 2008/06/28 18:25:41 lehman stable $

\ProvidesFile{etoolbox.def}[2008/06/28 v1.7 etoolbox debug messages]

\begingroup
\makeatletter
\@makeother\+
\@makeother\-
\@makeother\=
\@makeother\>

\long\gdef\etb@dbg@trce#1{\typeout{%
  [debug] tracing \string#1\on@line}}%
\long\gdef\etb@dbg@init#1{\typeout{%
  [debug] analyzing \detokenize\expandafter{\string#1}}}%
\gdef\etb@dbg@info#1{\typeout{%
  [debug] ++ \csuse{etb@msg@i@#1}}}%
\gdef\etb@dbg@succ#1{\typeout{%
  [debug] == \csuse{etb@msg@s@#1}}}%
\gdef\etb@dbg@fail#1{\typeout{%
  [debug] -- \csuse{etb@msg@f@#1}}}%

\gdef\etb@msg@ex{^^J[debug] -> }%
\gdef\etb@msg@br{^^J[debug]\@spaces}

\gdef\etb@msg@i@def{%
  control sequence is defined}
\gdef\etb@msg@i@mac{%
  control sequence is a macro}
\gdef\etb@msg@i@prm{%
  control sequence is a macro with parameters}
\gdef\etb@msg@i@prl{%
  control sequence is a macro without parameters}
\xdef\etb@msg@i@pro{%
  control sequence is a \string\protected\space macro}
\gdef\etb@msg@i@tok{%
  macro can be retokenized cleanly}
\gdef\etb@msg@i@pat{%
  search pattern found in replacement text}
\gdef\etb@msg@i@pos{%
  patching possible}
\gdef\etb@msg@s@red{%
  redefining macro now}
\gdef\etb@msg@s@ret{%
  retokenizing macro now}
\gdef\etb@msg@f@def{%
  control sequence is undefined or \@backslashchar relax}
\gdef\etb@msg@f@mac{%
  control sequence is not a macro}
\gdef\etb@msg@f@tok{%
  macro cannot be retokenized cleanly\etb@msg@ex
  the macro may have been defined under a category\etb@msg@br
  code regime different from the current one\etb@msg@ex
  the replacement text may contain special control\etb@msg@br
  sequence tokens formed with \@backslashchar
  csname...\@backslashchar endcsname;\etb@msg@ex
  the replacement text may contain carriage return,\etb@msg@br
  newline, or similar characters}
\xdef\etb@msg@f@hsh{%
  nested patching command and parameters in patch\noexpand\etb@msg@ex
  the patching command seems to be nested in the\noexpand\etb@msg@br
  argument to some other command\noexpand\etb@msg@ex
  the patch text seems to contain \string# characters\noexpand\etb@msg@ex
  either avoid nesting or use \string# characters with\noexpand\etb@msg@br
  category code 12 in the patch text\noexpand\etb@msg@ex
  simply doubling the \string# characters will not work}
\gdef\etb@msg@f@pat{%
  search pattern not found in replacement text}

\endgroup
\endinput
