]> code.delx.au - gnu-emacs/commitdiff
(custom-save-all): Error if saving in .emacs and it had an error when loaded.
authorRichard M. Stallman <rms@gnu.org>
Sun, 5 Nov 2006 15:17:49 +0000 (15:17 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 5 Nov 2006 15:17:49 +0000 (15:17 +0000)
lisp/cus-edit.el

index 00f76b31520d98dd2f5e21ffa91ef09fc6557e0b..c70284f4455563dd333f3b6ad3e4f2d520eb2412 100644 (file)
@@ -4149,6 +4149,8 @@ if only the first line of the docstring is shown."))
 ;;;###autoload
 (defun custom-save-all ()
   "Save all customizations in `custom-file'."
+  (when (and (null custom-file) init-file-had-error)
+    (error "Cannot save customizations; init file was not fully loaded"))
   (let* ((filename (custom-file))
         (recentf-exclude (if recentf-mode
                              (cons (concat "\\`"