diff -ru xemacs-21.5.28.20080401.orig//lisp/bytecomp.el xemacs-21.5.28.20080401/lisp/bytecomp.el --- xemacs-21.5.28.20080401.orig//lisp/bytecomp.el 2008-04-01 19:40:35.000000000 +0200 +++ xemacs-21.5.28.20080401/lisp/bytecomp.el 2008-10-29 12:48:15.000000000 +0100 @@ -1618,7 +1618,10 @@ (unless byte-compile-overwrite-file (ignore-file-errors (delete-file target-file))) (if (file-writable-p target-file) - (write-region 1 (point-max) target-file) + ;; prevent generic hooks from changing our format, eg, + ;; latin-unity is known to change the coding system! + (let ((write-region-pre-hook nil)) + (write-region 1 (point-max) target-file)) ;; This is just to give a better error message than write-region (signal 'file-error (list "Opening output file"