diff lisp/cus-edit.el @ 4257:ef6c55ab3090

[xemacs-hg @ 2007-11-08 14:43:38 by aidan] Fix corruption of ~/.emacs when trying to migrate an init file; thank you Jason Spiro!
author aidan
date Thu, 08 Nov 2007 14:43:40 +0000
parents e687f1912d5b
children 20accccbebd6
line wrap: on
line diff
--- a/lisp/cus-edit.el	Thu Nov 08 07:12:40 2007 +0000
+++ b/lisp/cus-edit.el	Thu Nov 08 14:43:40 2007 +0000
@@ -3756,6 +3756,9 @@
 ;;;###autoload
 (defun custom-save-all ()
   "Save all customizations in `custom-file'."
+  (when init-file-had-error
+    (error 'invalid-change
+	   "Cannot save customizations; init file was not fully loaded"))
   (let ((inhibit-read-only t))
     (custom-save-variables)
     (custom-save-faces)