We describe a bent-crystal spectrometer adapted to measure x-ray emission resulting from core-level excitation of gas-phase molecules in the 0.8-8 keV energy range. The spectrometer is based on the Johann principle, and uses a microfocused photon beam to provide high-resolution (resolving power of approximately 7500). A gas cell was designed to hold a high-pressure (300 mbar) sample of gas while maintaining a high vacuum (10(-9) mbar) in the chamber. The cell was designed to optimize the counting rate (2000 cts/s at the maximum of the Cl Kalpha emission line), while minimizing self-absorption. Example of the Kalpha emission lines of CH(3)Cl molecules is presented to illustrate the capabilities of this new instrument.