# HG changeset patch # User Eli Zaretskii # Date 1195237331 0 # Node ID 371591e2f734dc91a2c09d8d08a44fb9b87362fd # Parent 018815e0a2397216658834e20e6bcc90aad28893 (set-locale-environment): Set default-file-name-coding-system _after_ keyboard and terminal coding systems. This fixes last change. diff -r 018815e0a239 -r 371591e2f734 lisp/international/mule-cmds.el --- a/lisp/international/mule-cmds.el Fri Nov 16 16:05:53 2007 +0000 +++ b/lisp/international/mule-cmds.el Fri Nov 16 18:22:11 2007 +0000 @@ -2615,9 +2615,18 @@ (let ((code-page-coding (intern (format "cp%d" w32-ansi-code-page)))) (when (coding-system-p code-page-coding) (setq locale-coding-system code-page-coding) - (setq default-file-name-coding-system code-page-coding) (set-keyboard-coding-system code-page-coding) - (set-terminal-coding-system code-page-coding)))) + (set-terminal-coding-system code-page-coding) + ;; Set default-file-name-coding-system last, so that Emacs + ;; doesn't try to use cpNNNN when it defines keyboard and + ;; terminal encoding. That's because the above two lines + ;; will want to load code-pages.el, where cpNNNN are + ;; defined; if default-file-name-coding-system were set to + ;; cpNNNN while these two lines run, Emacs will want to use + ;; it for encoding the file name it wants to load. And that + ;; will fail, since cpNNNN is not yet usable until + ;; code-pages.el finishes loading. + (setq default-file-name-coding-system code-page-coding)))) (when (eq system-type 'darwin) ;; On Darwin, file names are always encoded in utf-8, no matter