By use of analytic expressions for core and excited-state electron wave functions, we examine the validity of the ``dipole approximation'' in electron-energy-loss spectroscopy (EELS) due to the M-shell excitations of atoms up to an atomic number of about 50. We conclude that the dipole approximation is clearly justified for all M edges excited by electrons of high primary energy under typical conditions in an electron microscope. For the relatively low primary energies typically used to increase surface sensitivity in reflection EELS, the conditions for the dipole approximation are easily satisfied for all M-edge excitations of the lighter elements, and are reasonably well justified even for the heavier elements of our range.