changeset 58619:99adc3e470bb

(command-line): Decode all buffer names by locale-coding-system.
author Kenichi Handa <handa@m17n.org>
date Mon, 29 Nov 2004 07:17:56 +0000
parents 567ca4ca8574
children d03afca07655
files lisp/startup.el
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/startup.el	Mon Nov 29 07:16:25 2004 +0000
+++ b/lisp/startup.el	Mon Nov 29 07:17:56 2004 +0000
@@ -953,6 +953,19 @@
 
   (run-hooks 'after-init-hook)
 
+  ;; Decode all buffer names.
+  (if (and default-enable-multibyte-characters locale-coding-system)
+      (save-excursion
+	(dolist (elt (buffer-list))
+	  (set-buffer elt)
+	  (if default-directory
+	      (setq default-directory
+		    (decode-coding-string default-directory
+					  locale-coding-system t))))
+	(setq command-line-default-directory
+	      (decode-coding-string command-line-default-directory
+				    locale-coding-system t))))
+
   ;; If *scratch* exists and init file didn't change its mode, initialize it.
   (if (get-buffer "*scratch*")
       (with-current-buffer "*scratch*"