changeset 73702:2bd04d2f629a

(custom-save-all): Error if saving in .emacs and it had an error when loaded.
author Richard M. Stallman <rms@gnu.org>
date Sun, 05 Nov 2006 15:17:49 +0000
parents 1c9765fecfa4
children b99c559d6365
files lisp/cus-edit.el
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/cus-edit.el	Sun Nov 05 15:00:31 2006 +0000
+++ b/lisp/cus-edit.el	Sun Nov 05 15:17:49 2006 +0000
@@ -4149,6 +4149,8 @@
 ;;;###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 "\\`"