limiting expansion in marks

I'm trying to pass something complex (e.g. tabular) to output procedure through marks. Is there any natural way to protect from expansion everything that should be protected (presumably because of not-long definitions)?

Example that does not work without \noexpand's

\documentclass{book}

\usepackage{mdwtab}
\begin{document}

\leavevmode

\markright{\noexpand\begin{tabular}{|p{2cm}<{\noexpand\centering}|}\noexpand\hlx{hv} Row 1 \\ Row 2\\\noexpand\hlx{vh}\noexpand\end{tabular}}

\end{document}

• \markright{\unexpanded{...whatever...}} – egreg Oct 28 '13 at 21:28