From 59938af3338f4b06cdf036d34c26b42e014665e4 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 16 Nov 2007 18:23:20 +0000 Subject: [PATCH] (set-locale-environment): Set default-file-name-coding-system _after_ keyboard and terminal coding systems. This fixes last change. --- lisp/ChangeLog | 4 ++++ lisp/international/mule-cmds.el | 13 +++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fca25ad829b..ef27cfa60e4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2007-11-16 Eli Zaretskii + * international/mule-cmds.el (set-locale-environment): Set + default-file-name-coding-system _after_ keyboard and terminal + coding systems. This fixes last change. + * mail/rmail.el (rmail-current-subject-regexp): Allow more than one space after "Subject:". diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index bd2d03eb5d4..6dd1bf07213 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -2615,9 +2615,18 @@ See also `locale-charset-language-names', `locale-language-names', (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 -- 2.39.2