A measurement of the horizontal coherence function of 7.9 keV radiation from an undulator beam line at the Advanced Photon Source is reported. X-ray diffraction from a phase-shifting mask was used, and the coherence function was measured as a function of the width of beam-conditioning slits in the beam line. The coherence distribution is found to be best described by a Lorentzian function.