this is an answer to an old LaTeX bug (see LaTeX bug database).
Unhappily I can't write an answer to the LaTeX bug system.
After three failed tries I have to use this list for that.
Please update the help text in the database:
* How to answer to a bug entry?
  * Which email address(es)?
    Probably: [log in to unmask]
    Anything else?
    How is the bug reporter is notified, if the answering
    person is different?
  * From address?
    Is any address allowed or it is limited to
    the bug reporter and authorisized people (LaTeX team)?
  * Subject?
    I have seen
      Re: <category>/<number>
      Re: <category>/<number>: <synopsis>
  * Are there delays in the processing of mails send to the
    bug database regarding answers (cronjob, moderation, ...)?

For bug latex/3540 there are workarounds:

A workaround with e-TeX:

  \expandafter{\detokenize{\#,\$,\%,\^,\_,\~,\ ,\&,\{,\}}}

Workaround without e-TeX:

    \def\x{\#,\$,\%,\^,\_,\~,\ ,\&,\{,\}}%^^A

or for just one of them:


More tricky is `\ ', because the space has catcode 12 during
the matching.


Most of them (except \{ and \}) could be catched
in \DoNotIndex of doc.sty by changing

    \catcode`\\12 %


    \catcode`\{=1 %
    \catcode`\}=2 %

Yours sincerely
  Heiko Oberdiek