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

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

hs-hide-level fails to hide blocks that begin on line another block ende


From: Britton Kerin
Subject: hs-hide-level fails to hide blocks that begin on line another block ended on
Date: Thu, 22 Jan 2004 16:28:37 -0900 (AKST)

The file test_source.c (also attached) looks like this:

if ( some_condition ) {
  do_some_stuff ();
} else {
  do_some_other_stuff ();
}

The following commands

alitak$ 'emacs' -q test_source.c

M-x hs-minor-mode
M-x hs-hide-level

Results in a buffer display that looks like this:

if ( some_condition ) {...
  do_some_other_stuff ();
}

It would be better to hide both the if and the else blocks in this 
case.  If the file test_source.c is rewritten to look like this:

if ( some_condition ) {
  do_some_stuff ();
} else
{
  do_some_other_stuff ();
}

Then we get this behavior:

alitak$ 'emacs' -q test_source.c

M-x hs-minor-mode
M-x hs-hide-level

Show just 

if ( some_condition ) ...

in the buffer, but moving to the beginning of that line and doing 
M-x hs-show-block gives:

if ( some_condition )
{
  do_some_stuff ();
} else ...

In this case it would be better if both blocks were restored.

Emacs version:

GNU Emacs 21.3.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of
2004-01-22 on alitak.asf.alaska.edu

Configuration command line:

./configure --prefix=/home/bkerin/local

Source modifications: None

Britton Kerin

Attachment: test_source.c
Description: Text document


reply via email to

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