summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
Diffstat (limited to 'Misc')
-rw-r--r--Misc/python-mode.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/Misc/python-mode.el b/Misc/python-mode.el
index 6fadfa1..b50ce95 100644
--- a/Misc/python-mode.el
+++ b/Misc/python-mode.el
@@ -1529,7 +1529,12 @@ the new line indented."
(while (and (< (point) startpos)
(looking-at "[ \t]*[#\n\\\\]")) ; skip noise
(forward-line 1))
- (if (< (point) startpos)
+ (if (and (< (point) startpos)
+ (/= startpos
+ (save-excursion
+ (goto-char (1+ open-bracket-pos))
+ (skip-chars-forward " \t\n")
+ (point))))
;; again mimic the first list item
(current-indentation)
;; else they're about to enter the first item