diff options
| author | Richard M. Stallman | 2002-10-26 22:41:33 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2002-10-26 22:41:33 +0000 |
| commit | a04d59830e46664faa4d534366a6b07e3b7c12f2 (patch) | |
| tree | b0997592063663d23fdde008fbf2a9a2797be53c | |
| parent | 15693bc3acb9e46f217401488b96b87f7e96fdb3 (diff) | |
| download | emacs-a04d59830e46664faa4d534366a6b07e3b7c12f2.tar.gz emacs-a04d59830e46664faa4d534366a6b07e3b7c12f2.zip | |
(command-line): Look for .emacs under ~/.emacs.d after looking in ~.
| -rw-r--r-- | lisp/startup.el | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/lisp/startup.el b/lisp/startup.el index 99de8ff30d1..4ec30fd26b3 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -916,11 +916,23 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." | |||
| 916 | (setq user-init-file t) | 916 | (setq user-init-file t) |
| 917 | (load user-init-file-1 t t) | 917 | (load user-init-file-1 t t) |
| 918 | 918 | ||
| 919 | ;; If we did not find the user's init file, | 919 | (when (eq user-init-file t) |
| 920 | ;; set user-init-file conclusively to nil; | 920 | ;; If we did not find ~/.emacs, try |
| 921 | ;; don't let it be set from default.el. | 921 | ;; ~/.emacs.d/.emacs. |
| 922 | (if (eq user-init-file t) | 922 | (let ((otherfile |
| 923 | (setq user-init-file user-init-file-1)) | 923 | (expand-file-name |
| 924 | (file-name-nondirectory user-init-file-1) | ||
| 925 | (file-name-as-directory | ||
| 926 | (expand-file-name | ||
| 927 | ".emacs.d" | ||
| 928 | (file-name-directory user-init-file-1)))))) | ||
| 929 | (load otherfile t t) | ||
| 930 | |||
| 931 | ;; If we did not find the user's init file, | ||
| 932 | ;; set user-init-file conclusively. | ||
| 933 | ;; Don't let it be set from default.el. | ||
| 934 | (when (eq user-init-file t) | ||
| 935 | (setq user-init-file user-init-file-1)))) | ||
| 924 | 936 | ||
| 925 | ;; If we loaded a compiled file, set | 937 | ;; If we loaded a compiled file, set |
| 926 | ;; `user-init-file' to the source version if that | 938 | ;; `user-init-file' to the source version if that |