changeset 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 f836e16e7b99
children e4240005e106
files lisp/ChangeLog lisp/mule/mule-cmds.el
diffstat 2 files changed, 22 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sat Jun 02 21:51:10 2007 +0000
+++ b/lisp/ChangeLog	Sun Jun 03 17:32:38 2007 +0000
@@ -1,3 +1,12 @@
+2007-06-03  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* mule/mule-cmds.el:
+	* mule/mule-cmds.el (system-type-file-name-coding): New.
+	* mule/mule-cmds.el (set-language-environment-coding-systems):
+	Check system-type-file-name-coding for an entry before making the
+	file-name coding system alias equivalent to the native coding
+	system alias. 
+
 2007-05-25  Mike Sperber  <mike@xemacs.org>
 
 	* startup.el (startup-setup-paths): Print the configure-xxx
--- 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. 
       ;;