  We extend the notion of semi-infinite cohomology of Lie algebras to include
cases where the Lie algebra does not admit a semi-infinite structure but
satisfies a mild condition. Our construction clarifies the definition of affine
W-algebras in general nilpotent elements case given by V. Kac, S. Roan and M.
Wakimoto. We will also give a characterization of admissible pairs with respect
to a nilpotent element in a semisimple Lie algebra and define affine W-algebras
associated to admissible pairs, while finite W-algebras associated to
admissible pairs were already introduced before.
