aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Berman2022-07-27 11:37:31 +0200
committerLars Ingebrigtsen2022-07-27 11:37:31 +0200
commitdc84264f3cb2ea9ab5b0af9f3529ebddb6bc0219 (patch)
tree8ed2f8f30f403aa7631945bda5817a26cb04d9b5
parent27b5ab80ec2785ed0e178f695ec3a5f5fabdbea2 (diff)
downloademacs-dc84264f3cb2ea9ab5b0af9f3529ebddb6bc0219.tar.gz
emacs-dc84264f3cb2ea9ab5b0af9f3529ebddb6bc0219.zip
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).
-rw-r--r--lisp/progmodes/python.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index ec7d6572200..b8fc7d4c546 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -5171,7 +5171,8 @@ likely an invalid python file."
5171 (while (and (< (point) cur-line) 5171 (while (and (< (point) cur-line)
5172 (setq no-back-indent 5172 (setq no-back-indent
5173 (or (> (current-indentation) indentation) 5173 (or (> (current-indentation) indentation)
5174 (python-info-current-line-empty-p)))) 5174 (python-info-current-line-empty-p)
5175 (python-info-current-line-comment-p))))
5175 (forward-line))) 5176 (forward-line)))
5176 no-back-indent))) 5177 no-back-indent)))
5177 (setq collected-indentations 5178 (setq collected-indentations