]> git.eshelyaron.com Git - emacs.git/commitdiff
Make sure *scratch* etc. use forward slashes in its default-directory
authorEli Zaretskii <eliz@gnu.org>
Fri, 25 Dec 2015 16:37:31 +0000 (18:37 +0200)
committerEli Zaretskii <eliz@gnu.org>
Fri, 25 Dec 2015 16:37:31 +0000 (18:37 +0200)
* lisp/startup.el (normal-top-level): On MS-Windows, convert
backslashes to forward slashes while decoding default-directory
of the initially-created buffers.

lisp/startup.el

index 13463107d2e0a86274b32e53c4854f394b6ae203..a31d35544a410070b86ba74e2d0c7460ad3b65e7 100644 (file)
@@ -544,7 +544,11 @@ It is the default value of the variable `top-level'."
            (set-buffer elt)
            (if default-directory
                (setq default-directory
-                     (decode-coding-string default-directory coding t)))))
+                      (if (eq system-type 'windows-nt)
+                          ;; Convert backslashes to forward slashes.
+                          (expand-file-name
+                           (decode-coding-string default-directory coding t))
+                        (decode-coding-string default-directory coding t))))))
 
        ;; Decode all the important variables and directory lists, now
        ;; that we know the locale's encoding.  This is because the