(command-line) [windows-nt]: Try .emacs first, then
authorJason Rumney <jasonr@gnu.org>
Mon, 20 Sep 2004 20:10:00 +0000 (20:10 +0000)
committerJason Rumney <jasonr@gnu.org>
Mon, 20 Sep 2004 20:10:00 +0000 (20:10 +0000)
_emacs, but revert to .emacs if neither exists in home directory.

lisp/ChangeLog
lisp/startup.el

index c533b95..88cebb1 100644 (file)
@@ -1,3 +1,8 @@
+2004-09-20  Jason Rumney  <jasonr@gnu.org>
+
+       * startup.el (command-line) [windows-nt]: Try .emacs first, then
+       _emacs, but revert to .emacs if neither exists in home directory.
+
 2004-09-20  John Paul Wallington  <jpw@gnu.org>
 
        * bindings.el (completion-ignored-extensions): Add .dfsl.
index c32ba2d..f42c734 100644 (file)
@@ -810,9 +810,14 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
                            ((eq system-type 'ms-dos)
                             (concat "~" init-file-user "/_emacs"))
                            ((eq system-type 'windows-nt)
+                            ;; Prefer .emacs on Windows.
                             (if (directory-files "~" nil "^\\.emacs\\(\\.elc?\\)?$")
                                 "~/.emacs"
-                              "~/_emacs"))
+                              ;; Also support _emacs for compatibility.
+                              (if (directory-files "~" nil "^_emacs\\(\\.elc?\\)?$")
+                                  "~/_emacs"
+                                ;; But default to .emacs if _emacs does not exist.
+                                "~/.emacs")))
                            ((eq system-type 'vax-vms)
                             "sys$login:.emacs")
                            (t