[COMMIT] Re: Followup: fix corruption of ~/.emacs when trying to
migrate an init file XEmacs can't fully load
Aidan Kehoe
kehoea at parhasard.net
Thu Nov 8 09:50:55 EST 2007
Ar an chéad lá de mí na Samhain, scríobh Jason Spiro:
> A month ago, I wrote:
> ...
> > This is a patch for a preference-corruption issue.
> ...
> > --- xemacs-21.5.27/lisp/cus-edit.el.orig Tue Jun 26 04:10:18 2007
> > +++ xemacs-21.5.27/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)
> >
>
> It seems this has not been applied yet.[1] Would someone please be so kind as
> to review it?
Reviewed and applied. Yes, there was discussion about other approaches, but
no-one’s proposed anything concrete, let alone implemented it, and this
change won’t make either any harder. Thank you!
APPROVE COMMIT
NOTE: This patch has been committed.
lisp/ChangeLog addition:
2007-11-08 Aidan Kehoe <kehoea at parhasard.net>
* cus-edit.el (custom-save-all):
Merge Jason Spiro's fix of
c241693f0710021645g642f145n5925c7a35e7b2c58 at 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 .
XEmacs Trunk source patch:
Diff command: cvs -q diff -u
Files affected: lisp/cus-edit.el
===================================================================
RCS
Index: lisp/cus-edit.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/cus-edit.el,v
retrieving revision 1.25
diff -u -r1.25 cus-edit.el
--- lisp/cus-edit.el 2007/09/20 21:18:35 1.25
+++ lisp/cus-edit.el 2007/11/08 14:41:00
@@ -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)
--
On the quay of the little Black Sea port, where the rescued pair came once
more into contact with civilization, Dobrinton was bitten by a dog which was
assumed to be mad, though it may only have been indiscriminating. (Saki)
More information about the XEmacs-Beta
mailing list