From fe7ecaf2e3a4f64fd43bb96e934716dd46271865 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 20 Sep 2004 20:10:00 +0000 Subject: [PATCH] (command-line) [windows-nt]: Try .emacs first, then _emacs, but revert to .emacs if neither exists in home directory. --- lisp/ChangeLog | 5 +++++ lisp/startup.el | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c533b95ab8f..88cebb15340 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-09-20 Jason Rumney + + * 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 * bindings.el (completion-ignored-extensions): Add .dfsl. diff --git a/lisp/startup.el b/lisp/startup.el index c32ba2ddfe7..f42c7345638 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -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 -- 2.39.2