From: Michael Orlitzky Date: Wed, 4 Mar 2026 03:20:51 +0000 (-0500) Subject: mode-hooks/python-mode-hooks.el: use "onetwo" style for docstrings X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=4857c99a1d1d2da3d5680662d9c45c8569848b15;p=emacs.d.git mode-hooks/python-mode-hooks.el: use "onetwo" style for docstrings I greatly prefer this, particularly for Sage docstrings, and it's annoying to have to "git add -i" around it all the time. --- diff --git a/mode-hooks/python-mode-hooks.el b/mode-hooks/python-mode-hooks.el index 9c3cf70..1968762 100644 --- a/mode-hooks/python-mode-hooks.el +++ b/mode-hooks/python-mode-hooks.el @@ -4,10 +4,14 @@ ;; my minibuffer in the process. (eldoc-mode 0) - ;; Use "django" style for python docstrings. This ensures that the + ;; Use "onetwo" style for python docstrings. This ensures that the ;; leading triple quotes remain on their own line when you paragraph- - ;; fill the first paragraph of the docstring. - (setq python-fill-docstring-style 'django) + ;; fill the first paragraph of the docstring, and that there is always + ;; a blank line at the end of the doctring before the trailing triple- + ;; quotes. This can look "wrong" in rare scenarios, but generally when + ;; you have several paragraphs and/or code blocks that are bounded + ;; above and below by whitespace, this will be more consistent. + (setq python-fill-docstring-style 'onetwo) )