unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#53913: 28.0.91; python.el: Fancy 'outline-heading-end-regexp' doesn't work well
@ 2022-02-10  9:14 Augusto Stoffel
  0 siblings, 0 replies; only message in thread
From: Augusto Stoffel @ 2022-02-10  9:14 UTC (permalink / raw)
  To: 53913

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.





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-10  9:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-10  9:14 bug#53913: 28.0.91; python.el: Fancy 'outline-heading-end-regexp' doesn't work well Augusto Stoffel

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).