APPROVE COMMIT
NOTE: This patch has been committed.
lisp/ChangeLog addition:
2007-06-03 Aidan Kehoe <kehoea(a)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.
XEmacs Trunk source patch:
Diff command: cvs -q diff -Nu
Files affected: lisp/mule/mule-cmds.el
===================================================================
RCS
Index: lisp/mule/mule-cmds.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/mule/mule-cmds.el,v
retrieving revision 1.31
diff -u -u -r1.31 mule-cmds.el
--- lisp/mule/mule-cmds.el 2006/12/30 17:04:32 1.31
+++ lisp/mule/mule-cmds.el 2007/06/03 17:14:32
@@ -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.
;;
--
On the quay of the little Black Sea port, where the rescued pair came once
more into contact with civilization, Dobrinton was bitten by a dog which was
assumed to be mad, though it may only have been indiscriminating. (Saki)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches