Merged from mwolson@gnu.org--2005 (patch 328)