(symbol-file): Remove unused variable `functions'.
[bpt/emacs.git] / lisp / startup.el
index 3e1526b..4ec30fd 100644 (file)
@@ -429,6 +429,9 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
       (save-excursion
        (set-buffer (get-buffer "*Messages*"))
        (setq default-directory dir)))
+    ;; `user-full-name' is now known; reset its standard-value here.
+    (put 'user-full-name 'standard-value
+        (list (default-value 'user-full-name)))
     ;; For root, preserve owner and group when editing files.
     (if (equal (user-uid) 0)
        (setq backup-by-copying-when-mismatch t))
@@ -913,11 +916,23 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
                      (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
@@ -1012,7 +1027,7 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
        (set-language-environment current-language-environment)))
     
     ;; Do this here in case the init file sets mail-host-address.
-    (or (equal user-mail-address "")
+    (if (equal user-mail-address "")
        (setq user-mail-address (concat (user-login-name) "@"
                                        (or mail-host-address
                                            (system-name)))))