# Strange chapter influence on quotation environment

The code below give a strange result when I comment out the \begingroup end \endgroup: the quotation environment has different vertical space to the text before ("Some text").

What is it that chapter defines that the quotation environment behaves different?

\documentclass{book}
\parindent 0pt
\begin{document}

%\begingroup  % <--- remove
\chapter{abc}
%\endgroup    % <--- remove

Some text

\begin{quotation}
quotation with(out) vertical distance to the previous text
\end{quotation}

\end{document}

-

LaTeX section headings locally redefine \everypar to remove indentation in the first paragraph so if you put them in a group things will go wrong.
Also, in particular it causes \if@nobreak to be true rather than false just before the quotation, which makes the latex list code take a different path.
I see something like @afterheading. That makes sense. Inserting \@afterheading after my \endgroup fixes the problem. Thanks! –  topskip Sep 7 '12 at 11:27
This is code I inherited from a grand master of TeX with so many complex definitions. I don't dare to change the definition, there must be something behind it. I have now added \@afterheading after the \endgroup in the hope that it has no bad effect. –  topskip Sep 7 '12 at 11:38