- Avoid corrupting the ~/.emacs file when migrating if it couldn't be fully

loaded.

See: https://stat.ethz.ch/pipermail/ess-help/2005-September/002851.html.

PR:		ports/114031
Submitted by:	Jason Spiro <jasonspiro4@gmail.com>
Obtained from:	http://cvs.savannah.gnu.org/viewvc/emacs/emacs/lisp/cus-edit.el?revision=1.321&view=markup
This commit is contained in:
Alejandro Pulver 2007-09-30 18:58:28 +00:00
parent 45d0a83152
commit 38d27d1bb4
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=200480

View file

@ -0,0 +1,11 @@
--- lisp/cus-edit.el.orig Tue Jun 26 04:10:18 2007
+++ lisp/cus-edit.el Tue Jun 26 04:14:52 2007
@@ -3756,6 +3756,8 @@
;;;###autoload
(defun custom-save-all ()
"Save all customizations in `custom-file'."
+ (when init-file-had-error
+ (error "Cannot save customizations; init file was not fully loaded"))
(let ((inhibit-read-only t))
(custom-save-variables)
(custom-save-faces)