diff lisp/code-files.el @ 380:8626e4521993 r21-2-5

Import from CVS: tag r21-2-5
author cvs
date Mon, 13 Aug 2007 11:07:10 +0200
parents cc15677e0335
children 74fd4e045ea6
line wrap: on
line diff
--- a/lisp/code-files.el	Mon Aug 13 11:06:08 2007 +0200
+++ b/lisp/code-files.el	Mon Aug 13 11:07:10 2007 +0200
@@ -57,20 +57,14 @@
   'buffer-file-coding-system-for-read)
 
 (defvar file-coding-system-alist
-  '(("\\.elc$" . (binary . binary))
-;; This must not be neccessary, slb suggests -kkm
+  `(
+;; This must not be necessary, slb suggests -kkm
 ;;  ("loaddefs.el$" . (binary . binary))
-    ("\\.tar$" . (binary . binary))
-    ("\\.\\(tif\\|tiff\\)$" . (binary . binary))
-    ("\\.png$" . (binary . binary))
-    ("\\.gif$" . (binary . binary))
-    ("\\.\\(jpeg\\|jpg\\)$" . (binary . binary))
-    ("TUTORIAL\\.hr$" . iso-8859-2)
-    ("TUTORIAL\\.pl$" . iso-8859-2)
-    ("TUTORIAL\\.ro$" . iso-8859-2)
+    ,@(mapcar
+       #'(lambda (regexp) (cons regexp 'binary)) binary-file-regexps)
+    ("TUTORIAL\\.\\(?:hr\\|pl\\|ro\\)\\'" . iso-8859-2)
     ;; ("\\.\\(el\\|emacs\\|info\\(-[0-9]+\\)?\\|texi\\)$" . iso-2022-8)
     ;; ("\\(ChangeLog\\|CHANGES-beta\\)$" . iso-2022-8)
-    ("\\.\\(gz\\|Z\\)$" . binary)
     ("/spool/mail/.*$" . convert-mbox-coding-system))
   "Alist to decide a coding system to use for a file I/O operation.
 The format is ((PATTERN . VAL) ...),
@@ -106,7 +100,7 @@
   "Set EOL type of buffer-file-coding-system of the current buffer to
 something other than what it is at the moment."
   (interactive)
-  (let ((eol-type 
+  (let ((eol-type
 	 (coding-system-eol-type buffer-file-coding-system)))
     (setq buffer-file-coding-system
 	  (subsidiary-coding-system
@@ -153,7 +147,7 @@
   (let ((alist file-coding-system-alist)
 	(found nil)
 	(codesys nil))
-    (let ((case-fold-search (eq system-type 'vax-vms)))
+    (let ((case-fold-search nil))
       (setq filename (file-name-sans-versions filename))
       (while (and (not found) alist)
 	(if (string-match (car (car alist)) filename)
@@ -179,7 +173,7 @@
   (let ((alist file-coding-system-alist)
 	(found nil)
 	(codesys nil))
-    (let ((case-fold-search (eq system-type 'vax-vms)))
+    (let ((case-fold-search nil))
       (setq filename (file-name-sans-versions filename))
       (while (and (not found) alist)
 	(if (string-match (car (car alist)) filename)
@@ -396,7 +390,7 @@
 See also `insert-file-contents-access-hook',
 `insert-file-contents-pre-hook', `insert-file-contents-error-hook',
 and `insert-file-contents-post-hook'."
-  (let (return-val coding-system used-codesys conversion-func)
+  (let (return-val coding-system used-codesys)
     ;; OK, first load the file.
     (condition-case err
 	(progn