Skip to content

Commit 3badd23

Browse files
kobarityEli-Zaretskii
authored andcommitted
Improve docstring of python-indent-def-block-scale
* lisp/progmodes/python.el (python-indent-def-block-scale): Improve docstring. (Bug#62696)
1 parent c14a41c commit 3badd23

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

lisp/progmodes/python.el

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1265,7 +1265,30 @@ For NODE, OVERRIDE, START, END, and ARGS, see
12651265
:type '(repeat symbol))
12661266

12671267
(defcustom python-indent-def-block-scale 2
1268-
"Multiplier applied to indentation inside multi-line def blocks."
1268+
"Multiplier applied to indentation inside multi-line blocks.
1269+
The indentation in parens in the block header will be the current
1270+
indentation plus `python-indent-offset' multiplied by this
1271+
variable. For example, the arguments are indented as follows if
1272+
this variable is 1:
1273+
1274+
def do_something(
1275+
arg1,
1276+
arg2):
1277+
print('hello')
1278+
1279+
if this variable is 2 (default):
1280+
1281+
def do_something(
1282+
arg1,
1283+
arg2):
1284+
print('hello')
1285+
1286+
This variable has an effect on all blocks, not just def block.
1287+
This variable only works if the opening paren is not followed by
1288+
non-whitespace characters on the same line. Modify
1289+
`python-indent-block-paren-deeper' to customize the case where
1290+
non-whitespace characters follow the opening paren on the same
1291+
line."
12691292
:version "26.1"
12701293
:type 'integer
12711294
:safe 'natnump)

0 commit comments

Comments
 (0)