# HG changeset patch # User Aidan Kehoe # Date 1316632029 -3600 # Node ID c17a46ac63afff076efd957bce958c4afde9da3e # Parent 5273dd66a1ba89ab11a42f5297eb26efd441b301 Include many more files in binary-file-regexps, files.el. lisp/ChangeLog addition: 2011-09-21 Aidan Kehoe * files.el (binary-file-regexps): Update this, adding everything that maps to no-conversion or no-conversion-multibyte in GNU's auto-mode-alist. In particular, add PDFs, important given gnus' problem with them of http://mid.gmane.org/m3r637lpm5.fsf@mikesoffice.com and the associated thread, and Uwe's recent re-reporting of the same problem. diff -r 5273dd66a1ba -r c17a46ac63af lisp/ChangeLog --- a/lisp/ChangeLog Wed Sep 21 19:14:15 2011 +0100 +++ b/lisp/ChangeLog Wed Sep 21 20:07:09 2011 +0100 @@ -1,3 +1,13 @@ +2011-09-21 Aidan Kehoe + + * files.el (binary-file-regexps): + Update this, adding everything that maps to no-conversion or + no-conversion-multibyte in GNU's auto-mode-alist. + In particular, add PDFs, important given gnus' problem with them + of http://mid.gmane.org/m3r637lpm5.fsf@mikesoffice.com and the + associated thread, and Uwe's recent re-reporting of the same + problem. + 2011-09-21 Aidan Kehoe * select.el (select-convert-to-text): diff -r 5273dd66a1ba -r c17a46ac63af lisp/files.el --- a/lisp/files.el Wed Sep 21 19:14:15 2011 +0100 +++ b/lisp/files.el Wed Sep 21 20:07:09 2011 +0100 @@ -1672,26 +1672,18 @@ If it matches, mode MODE is selected.") (defvar binary-file-regexps - '("\\.\\(?:bz2\\|elc\\|g\\(if\\|z\\)\\|jp\\(eg\\|g\\)\\|png\\|t\\(ar\\|gz\\|iff\\)\\|[Zo]\\)\\'") + '("\\.\\(?: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]\\)\\'") "List of regexps of filenames containing binary (non-text) data.") - ; (eval-when-compile ; (require 'regexp-opt) ; (list ; (format "\\.\\(?:%s\\)\\'" ; (regexp-opt -; '("tar" -; "tgz" -; "gz" -; "bz2" -; "Z" -; "o" -; "elc" -; "png" -; "gif" -; "tiff" -; "jpg" -; "jpeg")))))) +; '("7Z" "7z" "ARC" "EAR" "EXE" "JAR" "LZH" "RAR" "WAR" "XPI" "Z" +; "ZIP" "ZOO" "arc" "bz2" "ear" "elc" "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"))))) (defvar inhibit-first-line-modes-regexps binary-file-regexps