From: Dima Kogan <dima@secretsauce.net>
To: kobarity <kobarity@gmail.com>
Cc: 57551@debbugs.gnu.org, Lars Ingebrigtsen <larsi@gnus.org>
Subject: bug#57551: 29.0.50; hide-show in python-mode selects the current block imperfectly
Date: Mon, 05 Sep 2022 00:44:22 -0700 [thread overview]
Message-ID: <87tu5ms1mu.fsf@secretsauce.net> (raw)
In-Reply-To: <eke7zgff41cz.wl-kobarity@gmail.com>
Hi. Thanks for the analysis. I guess this isn't the right forum for this
discussion, but I'll put it here anyway. The reason I think the "if" and
"else" text and the preceding whitespace should be considered to lie
outside their block is that this is how cc-mode works. Consider the
C code equivalent to the Python code in the bug report:
void f(void)
{
if(1)
{
11;
}
else if(2)
{
22;
}
else if(3)
{
33;
}
else if(4)
{
44;
}
else
{
5;
}
return 0;
}
Here (hs-hide-block) hides the if/else blocks ONLY if the point is
inside the {}. Otherwise, the whole f() is hidden.
next prev parent reply other threads:[~2022-09-05 7:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-02 21:25 bug#57551: 29.0.50; hide-show in python-mode selects the current block imperfectly Dima Kogan
2022-09-04 15:15 ` kobarity
2022-09-04 17:01 ` Andreas Röhler
2022-09-05 7:44 ` Dima Kogan [this message]
2022-09-05 9:42 ` Andreas Röhler
2022-09-10 13:20 ` kobarity
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=87tu5ms1mu.fsf@secretsauce.net \
--to=dima@secretsauce.net \
--cc=57551@debbugs.gnu.org \
--cc=kobarity@gmail.com \
--cc=larsi@gnus.org \
/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.