help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: custom-set-faces [was: Highlight Active Window]


From: Drew Adams
Subject: RE: custom-set-faces [was: Highlight Active Window]
Date: Sat, 10 May 2008 10:44:13 -0700

> > You should not write custom-set-faces by hand.
> 
> I've read this statement before, but I've never seen any explication
> as to why.  Is it just because customize will blow it away?
> 
> I use custom-set-faces in a separate elisp files, but not in my
> custom-file.  I also never use customize, so maybe that's why I've not
> seen any issues.
> 
> Any other reason to not use custom-set-faces?

Someone more knowledgeable will no doubt correct me, but I think that is the
only reason. The comment in a `custom-file' or .emacs says this:

;; 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.

That explains why and where you shouldn't hand-edit the `custom-set-faces' entry
- or should do so only with care. It might be overwritten automatically by
Customize. That assumes a context of (1) using Customize to change a value and
then save the change and (2) Customize saving the change in the same file that
you edited.

So, no, I don't think there is any problem doing what you are doing, as long as
you never let Customize save to the same file that you edit.

That said, there is also no special reason to use `custom-set-faces' to do what
you want, unless you find it more convenient.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]