Contents in 1999-06-04-13 of release-21-2.
[chise/xemacs-chise.git.1] / lisp / code-files.el
index 3ff114b..434695a 100644 (file)
@@ -6,8 +6,6 @@
 
 ;; This file is part of XEmacs.
 
-;; This file is very similar to mule-files.el
-
 ;; XEmacs is free software; you can redistribute it and/or modify it
 ;; under the terms of the GNU General Public License as published by
 ;; the Free Software Foundation; either version 2, or (at your option)
 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
+;;; Synched up with: Not synched.
+
 ;;; Commentary:
 
-;;; Derived from mule.el in the original Mule but heavily modified
-;;; by Ben Wing.
+;; Derived from mule.el in the original Mule but heavily modified
+;; by Ben Wing.
 
 ;; 1997/3/11 modified by MORIOKA Tomohiko to sync with Emacs 20 API.
 
+;; This file was derived from the former mule-files.el which has been removed
+;; as of XEmacs 21.2.15.
+
 ;;; Code:
 
 (setq-default buffer-file-coding-system 'no-conversion)
@@ -57,20 +60,14 @@ global environment specification.")
   '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 +103,7 @@ the current value of `buffer-file-coding-system'."
   "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 +150,7 @@ object (the entry specified a coding system)."
   (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 +176,7 @@ object (the entry specified a coding system)."
   (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)
@@ -277,7 +274,7 @@ Return t if file exists."
       (if (or (<= (length filename) 0)
              (null (setq path
                          (locate-file filename load-path
-                                      (and (not nosuffix) ".elc:.el:")))))
+                                      (and (not nosuffix) '(".elc" ".el" ""))))))
          (and (null noerror)
               (signal 'file-error (list "Cannot open load file" filename)))
        ;; now use the internal load to actually load the file.
@@ -396,7 +393,7 @@ for reading.
 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
@@ -561,4 +558,9 @@ See also `write-region-pre-hook' and `write-region-post-hook'."
                        start end filename append visit lockname
                        coding-system)))
 
-;;; mule-files.el ends here
+;;; The following was all that remained in mule-files.el, so I moved it
+;;; here for neatness.  -sb
+(when (featurep 'mule)
+  (setq-default buffer-file-coding-system 'iso-2022-8))
+
+;;; code-files.el ends here