From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Baloff Newsgroups: gmane.emacs.help Subject: Re: expand/collapse{} in c++ Date: 27 Aug 2005 06:31:36 +1000 Organization: iPrimus Customer - reports relating to abuse should be sent to abuse@iprimus.com.au Message-ID: <87fyswfniv.fsf@wash.edu> References: <87y86s2zl5.fsf@wash.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1125087201 9073 80.91.229.2 (26 Aug 2005 20:13:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 26 Aug 2005 20:13:21 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 26 22:13:19 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E8kYG-0004go-JQ for geh-help-gnu-emacs@m.gmane.org; Fri, 26 Aug 2005 22:11:48 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E8kcD-000553-0H for geh-help-gnu-emacs@m.gmane.org; Fri, 26 Aug 2005 16:15:53 -0400 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 X-Original-NNTP-Posting-Host: 210.50.176.59 X-Original-NNTP-Posting-Host: 127.0.0.1 Original-Lines: 40 Original-NNTP-Posting-Host: 203.134.67.67 Original-X-Trace: 1125086848 un-2park-reader-02.sydney.pipenetworks.com.au 15514 203.134.67.67:4942 Original-X-Complaints-To: Abuse, including message IDs to abuse@pipenetworks.com Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.news.ucla.edu!newsfeed.media.kyoto-u.ac.jp!news1.optus.net.au!optus!news.uwa.edu.au!nntp.waia.asn.au!202.72.130.18.MISMATCH!quokka.wn.com.au!token.pipenetworks.com!218.100.2.58.MISMATCH!not-for-mail Original-Xref: shelby.stanford.edu gnu.emacs.help:133484 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:29019 Archived-At: Alan Mackenzie writes: > Baloff 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: aacm@muuc.dee; 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.