I quite often include attributed quotes in my documents, using something like:
\begin{quote}
Now I am become Death, the destroyer of worlds.
Also, I like bananas!
I like bananas so much that my quotes about them run to \emph{multiple paragraphs}!
\end{quote}
\begin{flushright}Ronald MacDonald\end{flushright}
I would like to keep my flushright environment on the same page as the last line of my quote environment.
My idea was to write a new environment which would force a page break, if one is needed, to occur at or before the last line of my quote.
I can see from other questions (in particular this one) that I should use widowpenalties, but I'm having trouble working out how to apply a penalty only to the last line.
The examples on the other question seem to suggest that \windowpenalties 3 x y 0 will apply a penalty of x to line -1, and y to all other lines.
In particular, it suggests
{\widowpenalties 4 10000 10000 -10000 0 \brokenpenalty 0 \par}
for breaking before the 3rd-last line of the paragraph.
However, I can't think how to write a newenvironment which will apply a penalty such that LaTeX breaks before the last line of a paragraph, but only apply it to the last paragraph of my quote.

\raggedbottom\clubpenalty=10000\widowpenalty=10000You can play with the values for fit it to your document.
– Aradnix Aug 25 '14 at 06:06csquotes. – Johannes_B Aug 25 '14 at 06:30