Mercurial > hg > xemacs-beta
comparison lisp/bytecomp.el @ 4529:6f41fb7f3a65 bytecomp-coding-system-2008-10-29
Protect .elc encoding from latin-unity.
author | Stephen J. Turnbull <stephen@xemacs.org> |
---|---|
date | Wed, 29 Oct 2008 12:59:48 +0900 |
parents | e8f448f997ac |
children | 061e030e3270 |
comparison
equal
deleted
inserted
replaced
4528:726060ee587c | 4529:6f41fb7f3a65 |
---|---|
1616 (insert "\n") ; aaah, unix. | 1616 (insert "\n") ; aaah, unix. |
1617 (setq target-file (byte-compile-dest-file filename)) | 1617 (setq target-file (byte-compile-dest-file filename)) |
1618 (unless byte-compile-overwrite-file | 1618 (unless byte-compile-overwrite-file |
1619 (ignore-file-errors (delete-file target-file))) | 1619 (ignore-file-errors (delete-file target-file))) |
1620 (if (file-writable-p target-file) | 1620 (if (file-writable-p target-file) |
1621 (write-region 1 (point-max) target-file) | 1621 ;; prevent generic hooks from changing our format, eg, |
1622 ;; latin-unity is known to change the coding system! | |
1623 (let ((write-region-pre-hook nil)) | |
1624 (write-region 1 (point-max) target-file)) | |
1622 ;; This is just to give a better error message than write-region | 1625 ;; This is just to give a better error message than write-region |
1623 (signal 'file-error | 1626 (signal 'file-error |
1624 (list "Opening output file" | 1627 (list "Opening output file" |
1625 (if (file-exists-p target-file) | 1628 (if (file-exists-p target-file) |
1626 "cannot overwrite file" | 1629 "cannot overwrite file" |