\input{windex}
\makeatletter

\let\@orig@citex=\@citex
\def\@citex[#1]#2{\@orig@citex[{#1}]{#2}\@backcite{#2}}
\def\@backcite#1{\@for\@citeb:=#1\do{\indexcite{\@citeb}}}
\def\indexcite#1{\index{\@ifundefined{b@#1}{#1}{\@nameuse{b@#1}}%
{\string\indexciteitem{#1}}}}

\let\@orig@idxitem=\@idxitem
\def\@idxitem#1#2 \par{\@orig@idxitem#1{#2}}

\def\indexciteitem#1#2{\auxout@citationpages{#1}{#2}\@indexciteitem{#1}{#2}}
\def\auxout@citationpages#1#2{\if@filesw \immediate\write\@auxout
       {\string\windcite{#1}{\@stripcom#2\@nil}}\fi}

\def\@stripcom, #1\@nil{#1}

\def\windcite#1#2{\global\@namedef{bp@#1}{#2}}

\def\indexstyle{\@ifstar{\@emptyindex}{\@indexstyle}}
\def\@indexstyle#1{\@nameuse{is@#1}}

\def\is@citesinind{%
\def\@indexciteitem##1{\refdescriptor{\@reflabel{##1}}}%
}

\def\is@citesinbib{%
\def\@indexciteitem##1##2{}%
\def\bibitem{\@ifnextchar[{\@@lbibitem}{\@@bibitem}}%
\bibintro{Following each reference, in brackets, is a list of pages where
that reference is cited.}%
}

\def\@@lbibitem[#1]#2#3\par{\@lbibitem[#1]{#2}#3\bibitempages{\@refpages{#2}}}
\def\@@bibitem#1#2\par{\@bibitem{#1}#2\bibitempages{\@refpages{#1}}}
\def\@refpages#1{\@ifundefined
	{bp@#1}{{\bf ?}\@warning
	{Citations to #1 not indexed}}{\@nameuse{bp@#1}}}
\def\bibitempages#1{\newblock [#1]}

\def\bibintro#1{
\let\@origthebib=\thebibliography
\let\@origlist=\list
\def\thebibliography{\def\list{#1\par\bigskip\@origlist}\@origthebib}%
}

\def\refdescriptor#1{reference [#1]}%
\def\@reflabel#1{\@ifundefined{b@#1}{{\bf ?}}{\@nameuse{b@#1}}}%

\makeatother
