emacs-diffs
[Top][All Lists]
Advanced

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

master dc84264f3c 1/2: Fix comment/else indentation problem in python-mo


From: Lars Ingebrigtsen
Subject: master dc84264f3c 1/2: Fix comment/else indentation problem in python-mode
Date: Wed, 27 Jul 2022 05:39:30 -0400 (EDT)

branch: master
commit dc84264f3cb2ea9ab5b0af9f3529ebddb6bc0219
Author: Stephen Berman <stephen.berman@gmx.net>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Fix comment/else indentation problem in python-mode
    
    * lisp/progmodes/python.el
    (python-info-dedenter-opening-block-positions): Fix indentation of
    "else" after a comment (bug#56742).
---
 lisp/progmodes/python.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index ec7d657220..b8fc7d4c54 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -5171,7 +5171,8 @@ likely an invalid python file."
                                  (while (and (< (point) cur-line)
                                              (setq no-back-indent
                                                    (or (> 
(current-indentation) indentation)
-                                                       
(python-info-current-line-empty-p))))
+                                                       
(python-info-current-line-empty-p)
+                                                       
(python-info-current-line-comment-p))))
                                    (forward-line)))
                                no-back-indent)))
                   (setq collected-indentations



reply via email to

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