emacs-pretest-bug
[Top][All Lists]
Advanced

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

custom-set-faces overridden?


From: Drew Adams
Subject: custom-set-faces overridden?
Date: Sun, 1 Jan 2006 12:49:56 -0800

I have a small library that I load before diff-mode.el. It defines a few
additional faces and does a defvar of diff-font-lock-keywords the way I want
it.

It also redefines some of the faces that will be defined in diff-mode.el
when it is loaded. I do that this way:

(custom-set-faces
 '(diff-added-face ((t (:foreground "DarkGreen"))) 'now)
 '(diff-changed-face ((t (:foreground "MediumBlue"))) 'now)
 '(diff-context-face ((t (:foreground "Black"))) 'now)
 '(diff-file-header-face ((t (:foreground "Red" :background "White"))) 'now)
 '(diff-header-face ((t (:foreground "Red"))) 'now)
 '(diff-hunk-header-face ((t (:foreground "White" :background "Salmon")))
'now)
 '(diff-index-face ((t (:foreground "Green"))) 'now)
 '(diff-nonexistent-face ((t (:foreground "DarkBlue"))) 'now)
 '(diff-removed-face ((t (:foreground "DarkMagenta"))) 'now)
 )

This worked perfectly in an April CVS snapshot. In a June snapshot, this
custom-set-faces no longer works - or else it gets overridden by the
subsequent face definitions in diff-mode.el.

When I read the doc string of custom-set-faces, it leads me to believe that
this should work: my library would, in effect, act as would a
custom-set-faces in a user's custom file, so that when those faces are
defined in diff-mode.el the settings from custom-set-faces would be used
instead.

I don't know if:

1. The June snapshot works correctly wrt custom-set-faces, and I'm
misunderstanding the behavior of custom-set-faces.

2. The April snapshot works correctly wrt custom-set-faces, and this was
subsequently broken (before June).

I don't know what the current snapshot does, and I cannot test it. If #2 is
correct, and this has not been fixed since June, then consider this a bug
report.

Could someone also please let me know which custom-set-faces behavior is
correct, so I can fix my library for the upcoming release. Thx.





reply via email to

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