Mercurial > emacs
changeset 48015:68b29ca63a54
(command-line): Look for .emacs under ~/.emacs.d after looking in ~.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 26 Oct 2002 22:41:33 +0000 |
parents | fc643b6ab4f4 |
children | 52a504c502a5 |
files | lisp/startup.el |
diffstat | 1 files changed, 17 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/startup.el Sat Oct 26 22:40:40 2002 +0000 +++ b/lisp/startup.el Sat Oct 26 22:41:33 2002 +0000 @@ -916,11 +916,23 @@ (setq user-init-file t) (load user-init-file-1 t t) - ;; If we did not find the user's init file, - ;; set user-init-file conclusively to nil; - ;; don't let it be set from default.el. - (if (eq user-init-file t) - (setq user-init-file user-init-file-1)) + (when (eq user-init-file t) + ;; If we did not find ~/.emacs, try + ;; ~/.emacs.d/.emacs. + (let ((otherfile + (expand-file-name + (file-name-nondirectory user-init-file-1) + (file-name-as-directory + (expand-file-name + ".emacs.d" + (file-name-directory user-init-file-1)))))) + (load otherfile t t) + + ;; If we did not find the user's init file, + ;; set user-init-file conclusively. + ;; Don't let it be set from default.el. + (when (eq user-init-file t) + (setq user-init-file user-init-file-1)))) ;; If we loaded a compiled file, set ;; `user-init-file' to the source version if that