changeset 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 1dabc28c10d0
children 4cead060e975
files lisp/ChangeLog lisp/cus-edit.el
diffstat 2 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Nov 08 07:12:40 2007 +0000
+++ b/lisp/ChangeLog	Thu Nov 08 14:43:40 2007 +0000
@@ -1,3 +1,12 @@
+2007-11-08  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* cus-edit.el (custom-save-all):
+	Merge Jason Spiro's fix of 
+	c241693f0710021645g642f145n5925c7a35e7b2c58@mail.gmail.com , to
+	avoid corruption of the custom-set-variables and custom-set-fonts
+	calls in ~/.emacs if XEmacs doesn't understand any part of the
+	syntax of ~/.emacs . 
+
 2007-10-31  Mike Sperber  <mike@xemacs.org>
 
 	* autoload.el (make-autoload): Add `defclass' and `defmethod' as
--- 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)