You can use hs-minor-mode for that (it comes with emacs). From my .emacs:

;; hide-show for all programming modes
(load-library "hideshow")
(add-hook 'c++-mode-hook 'hs-minor-mode)
(add-hook 'c-mode-hook 'hs-minor-mode)
(add-hook 'cperl-mode-hook 'hs-minor-mode)
(add-hook 'jde-mode-hook 'hs-minor-mode)

When it is loaded look at the Hide/Show menu what comands are there.

HTH,
Ekkehard



Reply via email to