[COMMIT] Merge a bug fix from Sebastian Freundt's SXEmacs work