Subject: bug#8141: 23.2.94; python-fill-paragraph

From: Andreas Röhler <[email-masked]>
Date: Mon, 28 Feb 2011 21:56:16 +0100

Hi,

attached a test file, revealing a bug in python-fill-paragraph already 
reported at lp, which pertains to python.el and python-mode.el likewise.

Patch attached.

Andreas

--
https://code.launchpad.net/~a-roehler/python-mode/python-mode-components
https://code.launchpad.net/s-x-emacs-werkstatt/
--- python.el	2011/02/28 20:22:31	1.1
+++ python.el	2011/02/28 20:24:23
@@ -2022,7 +2022,9 @@
 		;; current line.
 		((eq t (nth 3 syntax))	; in fenced string
 		 (goto-char (nth 8 syntax)) ; string start
-		 (setq start (line-beginning-position))
+                 (if (looking-at "\\(?:'''\\|\"\"\"\\|'\\|\"\\)\\\\?\n?")
+                     (setq start (match-end 0))
+                   (setq start (line-beginning-position)))
 		 (setq end (condition-case () ; for unbalanced quotes
                                (progn (forward-sexp)
                                       (- (point) 3))