From: Augusto Stoffel <arstoffel@gmail.com>
To: 53913@debbugs.gnu.org
Subject: bug#53913: 28.0.91; python.el: Fancy 'outline-heading-end-regexp' doesn't work well
Date: Thu, 10 Feb 2022 10:14:49 +0100 [thread overview]
Message-ID: <87fsorrsl2.fsf@gmail.com> (raw)
In python-mode, 'outline-heading-end-regexp' is set to ":[^\n]*\n", so
that a folded function definition still displays the argument list, like
this:
```
def f(
a,
b
):...
```
This is marginally nicer than what one would normally get, namely
```
def f(...
```
However, with the introduction of type hints, this special outline end
regexp doesn't work well anymore. For instance, the code
```
def f(
a: int,
b: str
) -> bool:
pass
```
folds as
```
def f(
a: int,...
```
which is much worse than not trying to be fancy.
In view of that, I would suggest to keep 'outline-heading-end-regexp' at
its default value of "\n" in pyhton-mode.
reply other threads:[~2022-02-10 9:14 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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fsorrsl2.fsf@gmail.com \
--to=arstoffel@gmail.com \
--cc=53913@debbugs.gnu.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).