Alan Mackenzie <[EMAIL PROTECTED]> writes:

> Baloff <[EMAIL PROTECTED]> wrote on 24 Aug 2005 06:00:22 +1000:
> 
> > Hello
> > I tried to find out how to do this expand/collapse the code into {...}
> > from the info docs but it is not there. could someone help please.
> 
> Oh yes it is!  Or, at least, something very like it.  The node is in the
> Emacs manual, and is called "Hideshow".  Briefly, enable it with "M-x
> hs-minor-mode" (possibly from a hook).  Then you will have commands
> available like :
> 
>   `C-c @ C-h'
>        Hide the current block (`hs-hide-block').
> 
>   `C-c @ C-s'
>        Show the current block (`hs-show-block').
> 
>   `C-c @ C-c'
>        Either hide or show the current block (`hs-toggle-hiding')
> 
> [ .... ]
> 
> > thanks
> 
> -- 
> Alan Mackenzie (Munich, Germany)
> Email: [EMAIL PROTECTED]; to decode, wherever there is a repeated letter
> (like "aa"), remove half of them (leaving, say, "a").

I did the following but I must have done something wrong because it is
still not working.
in my .emacs I put
(add-hook 'c++-mode-hook 'hs-minor-mode t) ;for block hide/show

in a .emacs-c++ file to be loaded from inside .emacs, I have
(local-set-key [f4] "\C-c @ \C-c") ;toggles block hide/show

restart emacs, when I open .cpp file, f4 does nothing.
_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

Reply via email to