all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Colin S. Miller" <no-spam-thank-you@csmiller.demon.co.uk>
Subject: Re: multiple collapse sections of code?
Date: Wed, 04 Oct 2006 18:18:26 +0100	[thread overview]
Message-ID: <4523ecee$0$49198$14726298@news.sunsite.dk> (raw)
In-Reply-To: <mailman.7708.1159895103.9609.help-gnu-emacs@gnu.org>

Mickey Ferguson wrote:
> Suppose I'm writing some C++ code that looks like the following:
> 
>  
> 
>   if (MyFunc() != NO_ERROR)
> 
>   {
> 
>     // now we start a big, complicated error handling routine
> 
>     CallFirstErrorHandlingRoutine();
> 
>     CallSecondEHRoutine();
> 
>     CallYetMore();
> 
>     // there would be much more, but I've abbreviated for simplicity
> 
>   }
> 
>  
> 
Mickey,

hs-minor-mode also does this.

I find these bindings more comfortable than the defaults

(add-hook 'hs-minor-mode-hook '(lambda ()
(define-key hs-minor-mode-map [(control c) (control \') (control h)] 'hs-hide-block)
(define-key hs-minor-mode-map [(control c) (control \') (control s)] 'hs-show-block)
(define-key hs-minor-mode-map [(control c) (control \') (control meta h)] 'hs-hide-all)
(define-key hs-minor-mode-map [(control c) (control \') (control meta s)] 'hs-show-all)
(define-key hs-minor-mode-map [(control c) (control \') (control l)] 'hs-hide-level)
(define-key hs-minor-mode-map [(control c) (control \') (control c)] 'hs-toggle-hiding)
))


It will place ellipsises after each folded block.

You can expand the block by right clicking on the ellipsis,
although I agree that a [+] icon would be more intuitive.

HTH,
Colin S. Miller

  parent reply	other threads:[~2006-10-04 17:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.7708.1159895103.9609.help-gnu-emacs@gnu.org>
2006-10-04  7:37 ` multiple collapse sections of code? Mathias Dahl
2006-10-04 17:18 ` Colin S. Miller [this message]
     [not found] <mailman.7769.1160064366.9609.help-gnu-emacs@gnu.org>
2006-10-08 13:36 ` Mathias Dahl
2006-10-05 16:06 Mickey Ferguson
     [not found] <mailman.7729.1159981526.9609.help-gnu-emacs@gnu.org>
2006-10-04 17:15 ` Charles philip Chan
2006-10-05  7:17 ` Mathias Dahl
  -- strict thread matches above, loose matches on Subject: below --
2006-10-04 17:05 Mickey Ferguson
2006-10-03 17:04 Mickey Ferguson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='4523ecee$0$49198$14726298@news.sunsite.dk' \
    --to=no-spam-thank-you@csmiller.demon.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.