diff lisp/mule/mule-cmds.el @ 3999:a0ef33811aa3

[xemacs-hg @ 2007-06-03 17:32:28 by aidan] Don't sniff the file-name-coding-system for OS X; use utf-8.
author aidan
date Sun, 03 Jun 2007 17:32:38 +0000
parents fbf54025c136
children c098c0d9125f
line wrap: on
line diff
--- a/lisp/mule/mule-cmds.el	Sat Jun 02 21:51:10 2007 +0000
+++ b/lisp/mule/mule-cmds.el	Sun Jun 03 17:32:38 2007 +0000
@@ -73,6 +73,14 @@
   (let ((coding-system-for-read 'iso-2022-7bit))
     (find-file-read-only (expand-file-name "HELLO" data-directory))))
 
+(defvar system-type-file-name-coding
+  '((darwin . utf-8))
+  "A map from values of `system-type' to invariant file name coding systems.
+Used if a give system type does not vary in the coding system it uses for
+file names; otherwise, `language-info-alist' is consulted for this
+information.  This affects the `file-name' coding system alias, but not the
+`file-name-coding-system' variable, which in practice is mostly ignored. ")
+
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;;                       Language Support Functions                    ;;;
@@ -1377,7 +1385,11 @@
 	(error
 	 (warn "Invalid native-coding-system %s in language environment %s"
 	       native language-name)))
-      (define-coding-system-alias 'file-name 'native)
+      (define-coding-system-alias 'file-name 
+        (or 
+         (let ((fncs (assq system-type system-type-file-name-coding)))
+           (and fncs (cdr fncs)))
+         'native))
       ;; Set the default keyboard and terminal coding systems to the native
       ;; coding system of the language environment. 
       ;;