aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el15
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 3af55be4a19..dcdadae0c4b 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1070,11 +1070,18 @@ possibilities can be narrowed to specific indentation points."
1070 (`(:no-indent . ,_) (prog-first-column)) ; usually 0 1070 (`(:no-indent . ,_) (prog-first-column)) ; usually 0
1071 (`(,(or :after-line 1071 (`(,(or :after-line
1072 :after-comment 1072 :after-comment
1073 :inside-string
1074 :after-backslash) . ,start) 1073 :after-backslash) . ,start)
1075 ;; Copy previous indentation. 1074 ;; Copy previous indentation.
1076 (goto-char start) 1075 (goto-char start)
1077 (current-indentation)) 1076 (current-indentation))
1077 (`(,(or :inside-string
1078 :inside-docstring) . ,start)
1079 ;; Copy previous indentation inside string
1080 (let ((prev (progn (forward-line -1)
1081 (current-indentation)))
1082 (base (progn (goto-char start)
1083 (current-column))))
1084 (sort (delete-dups (list 0 prev base)) #'<)))
1078 (`(,(or :inside-paren-at-closing-paren 1085 (`(,(or :inside-paren-at-closing-paren
1079 :inside-paren-at-closing-nested-paren) . ,start) 1086 :inside-paren-at-closing-nested-paren) . ,start)
1080 (goto-char (+ 1 start)) 1087 (goto-char (+ 1 start))
@@ -1083,12 +1090,6 @@ possibilities can be narrowed to specific indentation points."
1083 (current-indentation) 1090 (current-indentation)
1084 ;; Align with opening paren. 1091 ;; Align with opening paren.
1085 (current-column))) 1092 (current-column)))
1086 (`(:inside-docstring . ,start)
1087 (let* ((line-indentation (current-indentation))
1088 (base-indent (progn
1089 (goto-char start)
1090 (current-indentation))))
1091 (max line-indentation base-indent)))
1092 (`(,(or :after-block-start 1093 (`(,(or :after-block-start
1093 :after-backslash-first-line 1094 :after-backslash-first-line
1094 :after-backslash-assignment-continuation 1095 :after-backslash-assignment-continuation