# HG changeset patch # User Aidan Kehoe # Date 1316963527 -3600 # Node ID f0f1fd0d8486dc10d88245ca1f1f83f672557da5 # Parent c17a46ac63afff076efd957bce958c4afde9da3e Remove ELC files from `binary-file-regexps', many of them are escape-quoted. lisp/ChangeLog addition: 2011-09-25 Aidan Kehoe * files.el (binary-file-regexps): Remove ELC files from this, many of them are escape-quoted, and when opening them for viewing XEmacs should look at the coding cookie and respect that. * bytecomp.el (byte-compile-insert-header): Always insert a coding cookie, now ELC files are no longer in binary-file-regexps. diff -r c17a46ac63af -r f0f1fd0d8486 lisp/ChangeLog --- a/lisp/ChangeLog Wed Sep 21 20:07:09 2011 +0100 +++ b/lisp/ChangeLog Sun Sep 25 16:12:07 2011 +0100 @@ -1,3 +1,13 @@ +2011-09-25 Aidan Kehoe + + * files.el (binary-file-regexps): + Remove ELC files from this, many of them are escape-quoted, and + when opening them for viewing XEmacs should look at the coding + cookie and respect that. + * bytecomp.el (byte-compile-insert-header): + Always insert a coding cookie, now ELC files are no longer in + binary-file-regexps. + 2011-09-21 Aidan Kehoe * files.el (binary-file-regexps): diff -r c17a46ac63af -r f0f1fd0d8486 lisp/bytecomp.el --- a/lisp/bytecomp.el Wed Sep 21 20:07:09 2011 +0100 +++ b/lisp/bytecomp.el Sun Sep 25 16:12:07 2011 +0100 @@ -1934,10 +1934,8 @@ ";ELC" 20 "\000\000\000\n") - (when (not (eq (find-coding-system 'raw-text-unix) - (find-coding-system buffer-file-coding-system))) - (insert (format ";;;###coding system: %s\n" - (coding-system-name buffer-file-coding-system)))) + (insert (format ";;;###coding system: %s\n" + (coding-system-name buffer-file-coding-system))) (insert (format "\n(or %s\n (error \"Loading this file requires %s\"))\n" (let ((print-readably t)) diff -r c17a46ac63af -r f0f1fd0d8486 lisp/files.el --- a/lisp/files.el Wed Sep 21 20:07:09 2011 +0100 +++ b/lisp/files.el Sun Sep 25 16:12:07 2011 +0100 @@ -1672,7 +1672,7 @@ If it matches, mode MODE is selected.") (defvar binary-file-regexps - '("\\.\\(?:7[Zz]\\|ARC\\|E\\(?:AR\\|XE\\)\\|JAR\\|LZH\\|RAR\\|WAR\\|XPI\\|Z\\(?:IP\\|OO\\)\\|arc\\|bz2\\|e\\(?:ar\\|lc\\|xe\\)\\|g\\(?:if\\|z\\)\\|j\\(?:ar\\|p\\(?:e?g\\)\\)\\|l\\(?:ha\\|zh\\)\\|odt\\|p\\(?:bm\\|df\\|gm\\|n[gm]\\|pm\\)\\|sx[cdimw]\\|t\\(?:ar\\|gz\\|iff\\)\\|war\\|xpi\\|z\\(?:ip\\|oo\\)\\|[Zo]\\)\\'") + '("\\.\\(?:7[Zz]\\|ARC\\|E\\(?:AR\\|XE\\)\\|JAR\\|LZH\\|RAR\\|WAR\\|XPI\\|Z\\(?:IP\\|OO\\)\\|arc\\|bz2\\|e\\(?:ar\\|xe\\)\\|g\\(?:if\\|z\\)\\|j\\(?:ar\\|p\\(?:e?g\\)\\)\\|l\\(?:ha\\|zh\\)\\|odt\\|p\\(?:bm\\|df\\|gm\\|n[gm]\\|pm\\)\\|sx[cdimw]\\|t\\(?:ar\\|gz\\|iff\\)\\|war\\|xpi\\|z\\(?:ip\\|oo\\)\\|[Zo]\\)\\'") "List of regexps of filenames containing binary (non-text) data.") ; (eval-when-compile ; (require 'regexp-opt) @@ -1680,7 +1680,7 @@ ; (format "\\.\\(?:%s\\)\\'" ; (regexp-opt ; '("7Z" "7z" "ARC" "EAR" "EXE" "JAR" "LZH" "RAR" "WAR" "XPI" "Z" -; "ZIP" "ZOO" "arc" "bz2" "ear" "elc" "exe" "gif" "gz" "jar" +; "ZIP" "ZOO" "arc" "bz2" "ear" "exe" "gif" "gz" "jar" ; "jpeg" "jpg" "lha" "lzh" "o" "odt" "pbm" "pdf" "pgm" "png" ; "pnm" "ppm" "sxc" "sxd" "sxi" "sxm" "sxw" "tar" "tgz" ; "tiff" "war" "xpi" "zip" "zoo")))))