Subject: bug#188: 23.0.60; Custom-save deleting custom file

From: Chong Yidong <[email-masked]>
Date: Wed, 07 May 2008 22:17:24 -0400

Bastien Guerry <[email-masked]> writes:

> 1. emacs -Q
> 2. With an existing ~/.emacs-custom.el file, C-x C-e this:
>
>    (setq custom-file "~/.emacs-custom.el")
>    (load custom-file)
>
> 3. M-x customize-face RET font-lock-comment-face RET
> 4. [Don't do changes...]
> 5. C-x C-s
>
> Then the custom file is now:
>
> ,----
> | (custom-set-variables
> |   ;; custom-set-variables was added by Custom.
> |   ;; If you edit it by hand, you could mess it up, so be careful.
> |   ;; Your init file should contain only one such instance.
> |   ;; If there is more than one, they won't work right.
> |  )
> | 
> | 
> | (custom-set-faces
> |   ;; custom-set-faces was added by Custom.
> |   ;; If you edit it by hand, you could mess it up, so be careful.
> |   ;; Your init file should contain only one such instance.
> |   ;; If there is more than one, they won't work right.
> |  )
> `----
>
> As far as I can check, this is a problem with `custom-save-variables'
> not writing variables in the custom file if they lack some property. 

I don't see any problem.  If the custom-file was originally empty, that
above result is what I see.  But if the custom-file originally contains
customizations (which is not explained in your recipe, but which I
tried), those customizations are not lost.  Where's the problem?