diff options
author | Tassilo Horn <tsdh@gnu.org> | 2019-09-22 11:02:39 +0200 |
---|---|---|
committer | Tassilo Horn <tsdh@gnu.org> | 2019-09-22 11:02:39 +0200 |
commit | af0642a4cb220f33a43d1380be085bc0b7134bb8 (patch) | |
tree | e3b1b57bc42e712c77bd55fc4fc722cf93fe6c66 /lisp/progmodes/python.el | |
parent | 8992bc7d1b7e7babbf2899b5c45e84b486f504e6 (diff) | |
parent | 37a4233a366797360c2f4f475591a3406586bcfb (diff) | |
download | emacs-scratch/tsdh-vc-list-files.tar.gz |
Merge remote-tracking branch 'origin/master' into scratch/tsdh-vc-list-filesscratch/tsdh-vc-list-files
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r-- | lisp/progmodes/python.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 14b65669c4b..ec5d8c55512 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -4084,6 +4084,12 @@ JUSTIFY should be used (if applicable) as in `fill-paragraph'." (goto-char (line-end-position)))) t) +(defun python-do-auto-fill () + "Like `do-auto-fill', but bind `fill-indent-according-to-mode'." + ;; See Bug#36056. + (let ((fill-indent-according-to-mode t)) + (do-auto-fill))) + ;;; Skeletons @@ -5379,7 +5385,7 @@ REPORT-FN is Flymake's callback function." (set (make-local-variable 'paragraph-start) "\\s-*$") (set (make-local-variable 'fill-paragraph-function) #'python-fill-paragraph) - (set (make-local-variable 'fill-indent-according-to-mode) t) ; Bug#36056. + (set (make-local-variable 'normal-auto-fill-function) #'python-do-auto-fill) (set (make-local-variable 'beginning-of-defun-function) #'python-nav-beginning-of-defun) |