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.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 5f919bf495f..ce727391ce8 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -3544,6 +3544,8 @@ list is returned as is."
3544 (reverse acc)))) 3544 (reverse acc))))
3545 3545
3546 3546
3547(defvar electric-indent-inhibit)
3548
3547;;;###autoload 3549;;;###autoload
3548(define-derived-mode python-mode prog-mode "Python" 3550(define-derived-mode python-mode prog-mode "Python"
3549 "Major mode for editing Python files. 3551 "Major mode for editing Python files.
@@ -3572,7 +3574,9 @@ if that value is non-nil."
3572 (set (make-local-variable 'indent-line-function) 3574 (set (make-local-variable 'indent-line-function)
3573 #'python-indent-line-function) 3575 #'python-indent-line-function)
3574 (set (make-local-variable 'indent-region-function) #'python-indent-region) 3576 (set (make-local-variable 'indent-region-function) #'python-indent-region)
3575 3577 ;; Because indentation is not redundant, we cannot safely reindent code.
3578 (setq-local electric-indent-inhibit t)
3579
3576 (set (make-local-variable 'paragraph-start) "\\s-*$") 3580 (set (make-local-variable 'paragraph-start) "\\s-*$")
3577 (set (make-local-variable 'fill-paragraph-function) 3581 (set (make-local-variable 'fill-paragraph-function)
3578 'python-fill-paragraph) 3582 'python-fill-paragraph)