Make custom-data saving atomic
* lisp/cus-edit.el (custom-save-all): Do the custom saves as an atomic change group, to avoid writing invalid data if something goes wrong (or the user hits `C-g') in the middle (bug#18633).
This commit is contained in:
parent
1052707230
commit
f2bd536d36
1 changed files with 3 additions and 2 deletions
|
|
@ -4717,8 +4717,9 @@ if only the first line of the docstring is shown."))
|
|||
(let ((inhibit-read-only t)
|
||||
(print-length nil)
|
||||
(print-level nil))
|
||||
(custom-save-variables)
|
||||
(custom-save-faces))
|
||||
(atomic-change-group
|
||||
(custom-save-variables)
|
||||
(custom-save-faces)))
|
||||
(let ((file-precious-flag t))
|
||||
(save-buffer))
|
||||
(if old-buffer
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue