# Auctex: Fold all environments of a specific type in a buffer

With auctex I can run TeX-fold-env the environment on which point currently is located.

How can I fold all environments foo (\begin{foo}... \end{foo}) in my buffer at once? And how to unfold all occurences of foo?

(defun latex-fold-foo ()