diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/progmodes/python.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 20ec339fffb..f7267bdef29 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -4239,6 +4239,11 @@ JUSTIFY should be used (if applicable) as in `fill-paragraph'." (point))))) (num-quotes (python-syntax-count-quotes (char-after str-start-pos) str-start-pos)) + (str-line-start-pos + (save-excursion + (goto-char str-start-pos) + (beginning-of-line) + (point-marker))) (str-end-pos (save-excursion (goto-char (+ str-start-pos num-quotes)) @@ -4262,7 +4267,7 @@ JUSTIFY should be used (if applicable) as in `fill-paragraph'." ('symmetric (and multi-line-p (cons 1 1))))) (fill-paragraph-function)) (save-restriction - (narrow-to-region str-start-pos str-end-pos) + (narrow-to-region str-line-start-pos str-end-pos) (fill-paragraph justify)) (save-excursion (when (and (python-info-docstring-p) python-fill-docstring-style) |