\def\obeylinesmode{\begingroup
\obeylines
\GetObeyedLines
}
\def\GetObeyedLines#1{#1\endgroup}
The secret is to defer the reading of the argument until after the EOL's
have been made active.
>as suggested in Appendix E fo The TeXbook. I am looking for a macro with
>an argument.
Well, \obeylinesmode doesn't take an argument, but it immediately
invokes one that does. And the syntax looks exactly the same.