changeset 46889:13ce201c9620

(command-line): Load custom-file if not done yet.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 14 Aug 2002 21:46:21 +0000
parents ba6de43c41d7
children 9e6a5f8d0463
files lisp/startup.el
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/startup.el	Wed Aug 14 20:25:10 2002 +0000
+++ b/lisp/startup.el	Wed Aug 14 21:46:21 2002 +0000
@@ -932,6 +932,12 @@
 			      (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 @@
 
   ;; 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))))