diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2002-08-14 21:46:21 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2002-08-14 21:46:21 +0000 |
commit | 694210c486cd57207b7cabaad314d0116230ea81 (patch) | |
tree | 0246d4942c8befe0e46b5f6a49025f57132aaf17 /lisp/startup.el | |
parent | 2ca20b414915a88c5819994e833b7a27069ecb2e (diff) | |
download | emacs-694210c486cd57207b7cabaad314d0116230ea81.tar.gz |
(command-line): Load custom-file if not done yet.
Diffstat (limited to 'lisp/startup.el')
-rw-r--r-- | lisp/startup.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/startup.el b/lisp/startup.el index fbcc534e31b..35927ebf03a 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -932,6 +932,12 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." (sit-for 1)) (setq user-init-file source)))) + (when (and (stringp custom-file) + (not (assoc custom-file load-history))) + ;; If the .emacs file has set `custom-file' but hasn't + ;; loaded the file yet, let's load it. + (load custom-file t t)) + (or inhibit-default-init (let ((inhibit-startup-message nil)) ;; Users are supposed to be told their rights. @@ -1018,8 +1024,7 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." ;; If *scratch* exists and init file didn't change its mode, initialize it. (if (get-buffer "*scratch*") - (save-excursion - (set-buffer "*scratch*") + (with-current-buffer "*scratch*" (if (eq major-mode 'fundamental-mode) (funcall initial-major-mode)))) |