]> code.delx.au - gnu-emacs/commitdiff
(command-line): Decode all buffer names by locale-coding-system.
authorKenichi Handa <handa@m17n.org>
Mon, 29 Nov 2004 07:17:56 +0000 (07:17 +0000)
committerKenichi Handa <handa@m17n.org>
Mon, 29 Nov 2004 07:17:56 +0000 (07:17 +0000)
lisp/startup.el

index 36065f0224afedb39d634a14cad83f3e07c91caf..ed1a90c93548454536b917d3f0bff9bb00af1b74 100644 (file)
@@ -953,6 +953,19 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
 
   (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*"