]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve docstring of python-indent-def-block-scale
authorkobarity <kobarity@gmail.com>
Thu, 20 Apr 2023 13:55:29 +0000 (22:55 +0900)
committerEli Zaretskii <eliz@gnu.org>
Sat, 22 Apr 2023 09:30:25 +0000 (12:30 +0300)
* lisp/progmodes/python.el (python-indent-def-block-scale): Improve
docstring.  (Bug#62696)

lisp/progmodes/python.el

index 9ae95ecfc1cecc6ebebc64fb02bc775a977ae345..5bb15c609564d85cad19495a1ea27f5c8895f231 100644 (file)
@@ -1265,7 +1265,30 @@ For NODE, OVERRIDE, START, END, and ARGS, see
   :type '(repeat symbol))
 
 (defcustom python-indent-def-block-scale 2
-  "Multiplier applied to indentation inside multi-line def blocks."
+  "Multiplier applied to indentation inside multi-line blocks.
+The indentation in parens in the block header will be the current
+indentation plus `python-indent-offset' multiplied by this
+variable.  For example, the arguments are indented as follows if
+this variable is 1:
+
+    def do_something(
+        arg1,
+        arg2):
+        print('hello')
+
+if this variable is 2 (default):
+
+    def do_something(
+            arg1,
+            arg2):
+        print('hello')
+
+This variable has an effect on all blocks, not just def block.
+This variable only works if the opening paren is not followed by
+non-whitespace characters on the same line.  Modify
+`python-indent-block-paren-deeper' to customize the case where
+non-whitespace characters follow the opening paren on the same
+line."
   :version "26.1"
   :type 'integer
   :safe 'natnump)