help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

multiple collapse sections of code?


From: Mickey Ferguson
Subject: multiple collapse sections of code?
Date: Tue, 3 Oct 2006 10:04:57 -0700

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

  }

 

For simplification, I've made the function much smaller, and not used real function calls or anything.  But as I'm viewing the code, suppose that right now I'm not interested in seeing the error handling code.  Within Visual Studio you can click on a little minus sign that is to the left of the braces, and it will collapse and hide all of the code that is within the braces, replacing it with a plus sign.  Clicking on that plus sign expands it so that the error handling code is visible again.  You can have many parts collapsed at any given time.

 

The above code, collapsed, might look like:

 

  if (MyFunc() != NO_ERROR)

+ {}

 

 

Is there any package for GNU Emacs (I'm currently on 21.3.1, though I could upgrade to the latest if necessary) that will provide this functionality?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]