I want to disable auto-fill-mode when editing equations
===

How can I disable auto-fill-mode when editing equations?

I like auto-fill-mode in general, but I'd like to turn it off in specific situations, e.g. between a \begin{equation} and \end{equation} or \begin{equation*} and \end{equation*} or \begin{eqnarray} and \end{eqnarray*} etc.

I did some searching and found http://stackoverflow.com/questions/2008849/suppress-emacs-auto-fill-in-a-selected-region which looked relevant, but I couldn't make it work. Specifically, I tried changing "%%% BEGIN NO FILL" and "%%% END NO FILL" to "\begin{eq" and "\end{eq" to no avail.

Thanks in advance!