I would like to make a \todo command and environment whose behavior changes depending whether I define a command \showtodos. A basic \todo command is simple to write:
\ifthenelse{\isundefined{\showtodos}}{
\newcommand{\todo}[1]{}
}{
\newcommand{\todo}[1]{#1}
}
Essentially, I would like to hide the content of the \todo command unless \showtodos is defined. My question is how to write an environment which does the same thing?

todonotespackage, which you might find useful. If you load it with the package optiondisable(\usepackage[disable]{todonotes}), nothing will be displayed. Otherwise, its\todo{Rewrite this chapter}macro works really well. – doncherry Dec 11 '11 at 17:05