\documentclass[12pt,a4paper]{memoir}

\usepackage{ifxetex}
\RequireXeTeX
\usepackage{xltxtra}

\chapterstyle{bianchi}
\setlength\afterchapskip {\onelineskip }
\setlength\beforechapskip {\onelineskip }
\usepackage{lipsum}

\newcommand\dev{\catcode`\^=11
           \catcode`\~=11
           \fontspec[Mapping=itrans-dvn]{Code2000}}

\newcommand\kan{\catcode`\^=11
           \catcode`\~=11
           \fontspec[Script=Kannada,Mapping=itrans-sankan]{Code2000}}

\newcommand\lmr{\catcode`\^=11
           \catcode`\~=11
           \fontspec[Script=Roman,Mapping=itrans-iast]{Latin Modern Roman}}

\def\obeyspaceslines{\def\par{\leavevmode\null\endgraf\penalty-500\relax}%
                        \obeylines \obeyspaces}

\pagestyle{plain}

\setmainfont[SmallCapsFont = {Latin Modern Roman Caps},Ligatures = Common]
            {Latin Modern Roman}

\newcommand{\eat}[1]{}

\begin{document}

\renewcommand{\contentsname}{{\dev sUchI}}
\tableofcontents*

\eat{  % <-- comment out this and the closing brace to get an error

\chapter*{{\dev kR^ishhNaM vande jagadgurum.h}}
\addcontentsline{toc}{chapter}{{\kan kR^ishhNaM vande jagadgurum.h}}
\obeyspaceslines
{\lmr 
kR^ishhNAya yAdavendrAya j~nAnamudrAya yogine |
nAthAya rugmiNIshAya namo vedAntavedine ||
}

}      % <-- comment this out too

\chapter*{{\dev hayagrIvasampadAstotram.h}}
\addcontentsline{toc}{chapter}{{\lmr hayagrIvasampadAstotram.h}}
\obeyspaceslines
{\kan
hayagrIva hayagrIva hayagrIveti vAdinam.h |
naraM muJNchanti pApAni daridramiva yoshhitaH ||
}

\end{document}
