From: Britton Kerin <bkerin@asf.alaska.edu>
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) [thread overview]
Message-ID: <Pine.LNX.4.44.0401221615460.10671-200000@mail1.asf.alaska.edu> (raw)
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1144 bytes --]
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 #2: Type: TEXT/PLAIN, Size: 90 bytes --]
if ( some_condition ) {
do_some_stuff ();
} else {
do_some_other_stuff ();
}
[-- Attachment #3: Type: text/plain, Size: 148 bytes --]
_______________________________________________
Bug-gnu-emacs mailing list
Bug-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-gnu-emacs
reply other threads:[~2004-01-23 1:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=Pine.LNX.4.44.0401221615460.10671-200000@mail1.asf.alaska.edu \
--to=bkerin@asf.alaska.edu \
/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.