No takers? I'm sorry I'm doing the unthinkable and answering my own question.
Thanks to @Thruston for finding the relevant part from The TeXbook (p. 190):
TeX also allows “alignment displays”, which are not processed in math mode because they contain no formulas at the outer level. An alignment display is created by commands of the general form
$$<assignments>\halign{<alignment>}<assignments>$$
where the <assignments>
are optional things like parameter changes that do not produce any math lists. In such displays, the \halign
is processed exactly as if it had appeared in vertical mode, and it will construct a vertical list v
as usual, except that each row of the alignment will be shifted by the \displayindent
. After the alignment and the closing assignments have been processed, TeX will put a \predisplaypenalty
item and some \abovedisplayskip
glue on the main vertical list, followed by v
, followed by \postdisplaypenalty
item and \belowdisplayskip
glue.
(Emphasis mine.)
So building on this knowledge, one could do something like the following for \displaylines
-like command with indenting (I've left out all the other things it's doing):
\everydisplay={\displayindent=3\parindent}
\def\indentlines#1{
\halign{
\mathsurround=0pt
$\displaystyle ##\hfil$\crcr
\noalign{
\ifdim\predisplaysize<\displayindent
\kern-\abovedisplayskip\vskip\abovedisplayshortskip
\fi}
#1\crcr}}
\hsize=38em
Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie
consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan
et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis
dolore te feugait nulla facilisi.$$
\indentlines{ a + b = c. }
$$ Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
labore et dolore magna aliquyam erat, sed diam voluptua.
\bye
For some reason the \displayindent
needs to be set inside display math mode and not outside.
fleqn
class option for some reason? ah yes I see from the sources that it sets\abovedisplayshortskip
to be as\abovedisplayskip
foreqnarray
environment, but you could patch that.fleqn.clo
will provide inspiration for a Plain TeX approach.\halign
would only take up the full width if you explicitly told it to do so. So the\begindisplay
and\enddisplay
macros from Appendix E of the TeXbook should work properly with\abovedisplayskip
.$$\halign{...}$$
which makes an "alignment display" which is formatted differently... As p.190 makes clear alignment displays always get\abovedisplayskip
and never\abovedisplayshortskip
. So you might want to experiment with wrapping the halign in a vbox and adjusting hsize.