http://qs321.pair.com?node_id=59413


in reply to Emacs outline mode for Perl

Another way is to put

;; Local variables: ;; folded-file: t ;; end:

At the end of your file. Then you can use the string # {{{ (note the space at the end: Hash-Space-Brace-Brace-Brace-Space) to begin a fold block and # }}} (space!) to end that block. When XEmacs loads that file all blocks will be folded and you can usually open them with a rightclick on the fold mark. ISearch works over the folded parts, too.

Of course this works in many more languages (examine the value of fold-top-regexp or fold-top-mark to find the right string

Regards Stefan K