bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#42513: Possible fix for Python indentation problem


From: Dale Sedivec
Subject: bug#42513: Possible fix for Python indentation problem
Date: Tue, 15 Sep 2020 18:25:29 -0500

FYI I'm testing this fix against master:

diff --git a/python.el b/python.el
index b36a583..24f5f87 100644
--- a/python.el
+++ b/python.el
@@ -4991,6 +4991,7 @@ likely an invalid python file."
                            ;; block and the current line, otherwise it
                            ;; is not an opening block.
                            (save-excursion
+                             (python-nav-end-of-statement)
                              (forward-line)
                              (let ((no-back-indent t))
                                (save-match-data

(https://github.com/dsedivec/python/commit/7d2a97ca995c4a6673fa68861e42c54c9e8f6596.diff
 if my MUA mangles that.)

All this does is move to the end of the block opener (e.g. the "if" statement) 
before moving to the next line, where it expects to be within the "if"s block.

Dale




reply via email to

[Prev in Thread] Current Thread [Next in Thread]