>>>> "Jan" == Jan Vroonhof
<vroonhof(a)math.ethz.ch> writes:
Jan> Adrian Aichner <aichner(a)ecf.teradyne.com> writes:
> (custom-set-faces
> '(font-lock-comment-face ((t (:foreground "forest green" :bold t))))
> '(font-lock-doc-string-face ((t (:foreground "brown" :bold nil)))))
>
> fail to work.
Jan> Please give the values of the relevant specifiers.
Sorry, Jan, I don't understand what you mean here.
> Colors are OK, but they are rendered italic
Jan> given
> (copy-face 'italic 'font-lock-comment-face)
Jan> that seems correct. The patch changes the definition of the
Jan> customize specs to merge its explicit properties with the
Jan> other settings. For most properties that seems like the
Jan> correct thing to do and gets rid off all kinds of ugly
Jan> problems.
> and I cannot correct them
> via custom.
Jan> This however seems like a bug. You should be able to check
Jan> [x] italic and with a setting to off to force a non-intalic
Jan> face). Could you try calling
Jan> (make-face-unitalic font-lock-comment-face tags '(custom))
I am calling this with tags of nil, like custom does.
It doesn't work the first time around (returning [default]).
Second time it works. Here's what I did (in xemacs -vanilla):
(load-file (locate-file "sample.emacs" (list data-directory)))
(mapc
(function
(lambda (f)
(trace-function f)))
(list
(function mswindows-make-font-unitalic)
(function mswindows-make-font-italic)
(function frob-face-property)
))
(make-face-unitalic 'font-lock-comment-face nil '(custom))
======================================================================
1 -> frob-face-property: face=font-lock-comment-face property=font
func=mswindows-make-font-unitalic locale=nil tags=(custom)
1 <- frob-face-property: nil
(make-face-unitalic 'font-lock-comment-face nil '(custom))
;======================================================================
1 -> frob-face-property: face=font-lock-comment-face property=font
func=mswindows-make-font-unitalic locale=nil tags=(custom)
| 2 -> mswindows-make-font-unitalic: font=#<font-instance "Courier
New:Italic:10::Western" on #<mswindows-device on nil 0x1b0c> 0x1b25>
device=#<mswindows-device on nil 0x1b0c>
| 2 <- mswindows-make-font-unitalic: #<font-instance "Courier
New:Regular:10::Western" on #<mswindows-device on nil 0x1b0c> 0x2867>
| 2 -> mswindows-make-font-unitalic: font=#<font-instance "Courier
New:Regular:10::Western" on #<mswindows-device on nil 0x1b0c> 0x1b14>
device=#<mswindows-device on nil 0x1b0c>
| 2 <- mswindows-make-font-unitalic: #<font-instance "Courier
New:Regular:10::Western" on #<mswindows-device on nil 0x1b0c> 0x286f>
1 <- frob-face-property: nil
Jan> and if that does not work:
Jan> (make-face-unitalic font-lock-comment-face tags)
Jan> and may be single step through them to where they don't give
Jan> the right result.
From a newly started xemacs -vanilla, using custom,
mswindows-make-font-*italic never gets called:
(load-file (locate-file "sample.emacs" (list data-directory)))
(mapc
(function
(lambda (f)
(trace-function f)))
(list
(function mswindows-make-font-unitalic)
(function mswindows-make-font-italic)
(function frob-face-property)
))
(customize-face 'font-lock-comment-face)
This causes folloging trace, as custom faces are initialized:
======================================================================
1 -> frob-face-property: face=widget-button-face property=font
func=mswindows-make-font-bold locale=nil tags=(custom)
1 <- frob-face-property: nil
== [State]: you have set this face, but not saved it for future sessions.
utton-face property=font func=mswindows-make-font-bold locale=nil tags=(custom)
1 <- frob-face-property: nil
======================================================================
1 -> frob-face-property: face=custom-variable-button-face property=font
func=mswindows-make-font-bold locale=nil tags=(custom)
1 <- frob-face-property: nil
Now I toggle Italic between on and off in the
"*Customize Face: Font Lock Comment Face*"
buffer and hit the "Set" button after each change. Not much is
happening:
======================================================================
1 -> frob-face-property: face=font-lock-comment-face property=font
func=mswindows-make-font-unitalic locale=nil tags=(custom)
1 <- frob-face-property: nil
I am way too un-frobbed to understand all of this.
Andy? Jan?
Happy Weekend, all.
Adrian
Jan> --
Jan> Jan Vroonhof
http://www.math.ethz.ch/~vroonhof/
Jan> Mathematik, vroonhof @ math.ethz.ch
Jan> HG E16, ETH-Zentrum, Tel: +41-1-6325456/25154
Jan> Raemistrasse 101, CH-8092 Zuerich. Fax: +41-1-6321085
--
Adrian Aichner Teradyne GmbH, European Design Center
Integra Test Division Telephone +49/89/41861(0)-208
Dingolfinger Strasse 2 Fax +49/89/41861-217 (What is a Fax?)
D-81673 MUENCHEN E-mail adrian.aichner(a)teradyne.com