summaryrefslogtreecommitdiff
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 68926b275ea..5baf6e0f80a 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -752,6 +752,12 @@ It makes underscores and dots word constituent chars.")
:type '(repeat symbol)
:group 'python)
+(defcustom python-indent-def-block-scale 2
+ "Multiplier applied to indentation inside multi-line def blocks."
+ :version "26.1"
+ :type 'integer
+ :safe 'natnump)
+
(defvar python-indent-current-level 0
"Deprecated var available for compatibility.")
@@ -1071,9 +1077,9 @@ possibilities can be narrowed to specific indentation points."
(current-indentation)))
opening-block-start-points))))
(`(,(or :inside-paren-newline-start-from-block) . ,start)
- ;; Add two indentation levels to make the suite stand out.
(goto-char start)
- (+ (current-indentation) (* python-indent-offset 2))))))
+ (+ (current-indentation)
+ (* python-indent-offset python-indent-def-block-scale))))))
(defun python-indent--calculate-levels (indentation)
"Calculate levels list given INDENTATION.