diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index f31832fec9..01b6693f94 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -5168,7 +5168,8 @@ python-info-dedenter-opening-block-positions (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