GNU bug report logs -
#75729
[PATCH] python-mode: add `exit` to the list of block-enders
Previous Next
Full log
Message #23 received at 75729 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Tue, 2025-01-21 at 10:52 -0800, Stefan Kangas wrote:
> Konstantin Kharlamov <Hi-Angel <at> yandex.ru> writes:
>
> > diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
> > index 16c296a8f86..2feb9f47e1a 100644
> > --- a/lisp/progmodes/python.el
> > +++ b/lisp/progmodes/python.el
> > @@ -442,7 +442,8 @@ python-rx
> > symbol-end))
> > (block-ender (seq symbol-start
> > (or
> > - "break" "continue" "pass"
> > "raise" "return")
> > + "break" "continue" "pass"
> > "raise" "return"
> > + "exit")
> > symbol-end))
> > (decorator (seq line-start (* space) ?@ (any
> > letter ?_)
> > (* (any word ?_))))
> > --
> > 2.48.1
>
> Could you describe what behaviour changes this will result in?
>
> I recommend something brief about that to the commit message too.
Thank you, done! I put the following text to the commit message, please
see if it describes the change well enough:
> `exit()` and `quit()` end the current codeflow, there can't be any
> code past it, similarly to `return`, `continue`, etc. So when
> calculating indentation for the line next to `exit()` and `quit()`,
> decrease the indentation level.
Patch is attached.
[1.patch (text/x-patch, attachment)]
This bug report was last modified 180 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.