diff options
| author | Paul Eggert | 2018-01-09 15:29:25 -0800 |
|---|---|---|
| committer | Paul Eggert | 2018-01-09 15:29:25 -0800 |
| commit | 646c8e56f8a11832f25523907b85d6522a99f361 (patch) | |
| tree | 80ffd41982cfa018b827304ec5137ae6025f6080 /lisp/progmodes/python.el | |
| parent | 85f5ee14b55489845eaafbdf70d7f4e25ec44ed7 (diff) | |
| parent | d382d2bfc5072d4220b3e51785d22f70b147d63f (diff) | |
| download | emacs-646c8e56f8a11832f25523907b85d6522a99f361.tar.gz emacs-646c8e56f8a11832f25523907b85d6522a99f361.zip | |
Merge from origin/emacs-26
d382d2bfc5 * etc/DEBUG (Getting control to the debugger): Fix grammar.
687af4c8e8 * lisp/vc/vc.el (vc-region-history): log-view-vc-fileset h...
43e2aafae3 Don't bind dframe events on load (Bug#29599)
ab31bf3c5f * lisp/textmodes/picture.el (picture-mode-exit): Doc fix. ...
ed44d92fa6 * lisp/textmodes/picture.el (picture-open-line): Doc fix. ...
b87a772612 Fix description of 'emacs-internal'
a5256da588 Update PROBLEMS with selection-related issues
c59ecb005e New customization variable for python-mode indentation (Bu...
4e20c8f220 Fix menu keyboard shortcuts on macOS (Bug#29595)
# Conflicts:
# etc/NEWS
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 10 |
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.") | |||
| 752 | :type '(repeat symbol) | 752 | :type '(repeat symbol) |
| 753 | :group 'python) | 753 | :group 'python) |
| 754 | 754 | ||
| 755 | (defcustom python-indent-def-block-scale 2 | ||
| 756 | "Multiplier applied to indentation inside multi-line def blocks." | ||
| 757 | :version "26.1" | ||
| 758 | :type 'integer | ||
| 759 | :safe 'natnump) | ||
| 760 | |||
| 755 | (defvar python-indent-current-level 0 | 761 | (defvar python-indent-current-level 0 |
| 756 | "Deprecated var available for compatibility.") | 762 | "Deprecated var available for compatibility.") |
| 757 | 763 | ||
| @@ -1071,9 +1077,9 @@ possibilities can be narrowed to specific indentation points." | |||
| 1071 | (current-indentation))) | 1077 | (current-indentation))) |
| 1072 | opening-block-start-points)))) | 1078 | opening-block-start-points)))) |
| 1073 | (`(,(or :inside-paren-newline-start-from-block) . ,start) | 1079 | (`(,(or :inside-paren-newline-start-from-block) . ,start) |
| 1074 | ;; Add two indentation levels to make the suite stand out. | ||
| 1075 | (goto-char start) | 1080 | (goto-char start) |
| 1076 | (+ (current-indentation) (* python-indent-offset 2)))))) | 1081 | (+ (current-indentation) |
| 1082 | (* python-indent-offset python-indent-def-block-scale)))))) | ||
| 1077 | 1083 | ||
| 1078 | (defun python-indent--calculate-levels (indentation) | 1084 | (defun python-indent--calculate-levels (indentation) |
| 1079 | "Calculate levels list given INDENTATION. | 1085 | "Calculate levels list given INDENTATION. |