Localized excess-electron states are investigated using the density-functional formalism previously developed by Ebner, Saam, and Stroud for nonuniform classical fluids. The electron-atom interactions used contain a short-range effective core repulsion and a long-range polarization attraction. The interatomic interaction is a 6-12 potential. Some results are in agreement with previous density-functional calculations by Ebner and Punyanitya, who use a contact potential for the electron-atom interaction, in that no localized states are found in dilute helium and neon gases, while localized states are found in dense helium gas and liquid neon close to the liquid-gas coexistence curve. However, our present calculations disagree with the earlier ones in that they predict the localized states in liquid neon to be stable even at pressures much larger than the saturated vapor pressure, a consequence, we believe, of our inclusion of the polarization potential in the electron-atom interaction. We also find that localized states in the form of short-lived droplets are possible in argon and xenon gases close to the critical point. This finding is consistent with recent observations by Freeman and Huang of electron mobilities in these gases.