changeset:   4564:6f41fb7f3a6570572f5c03b39d8e9a436dae1ec3
user:        Stephen J. Turnbull <stephen(a)xemacs.org>
date:        Wed Oct 29 12:59:48 2008 +0900
files:       lisp/ChangeLog lisp/bytecomp.el
description:
Protect .elc encoding from latin-unity.
diff -r 726060ee587c536ac95384a055029092ea091231 -r
6f41fb7f3a6570572f5c03b39d8e9a436dae1ec3 lisp/ChangeLog
--- a/lisp/ChangeLog	Wed Oct 29 04:06:33 2008 +0900
+++ b/lisp/ChangeLog	Wed Oct 29 12:59:48 2008 +0900
@@ -1,3 +1,7 @@ 2008-10-28  Stephen J. Turnbull  <stephe
+2008-10-29  Stephen J. Turnbull  <stephen(a)xemacs.org>
+
+	* bytecomp.el (byte-compile-file): Protect encoding from latin-unity.
+
 2008-10-28  Stephen J. Turnbull  <stephen(a)xemacs.org>
 
 	* version.el (xemacs-betaname): Fix docstring typo.  (Thanks, Ville!)
diff -r 726060ee587c536ac95384a055029092ea091231 -r
6f41fb7f3a6570572f5c03b39d8e9a436dae1ec3 lisp/bytecomp.el
--- a/lisp/bytecomp.el	Wed Oct 29 04:06:33 2008 +0900
+++ b/lisp/bytecomp.el	Wed Oct 29 12:59:48 2008 +0900
@@ -1618,7 +1618,10 @@ With prefix arg (noninteractively: 2nd a
 	(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"
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches