problems setting up font lock via X Resources
Vin Shelton
acs at xemacs.org
Mon Feb 9 12:18:39 EST 2004
Charles Hines <chuck.hines at baesystems.com> writes:
> Howdy all.
>
> I was experimenting w/ setting up font lock (in XEmacs 21.4.15 under Solaris
> 8) via X Resources, and basically the only way I can get them to take effect
> triggers a warning from XEmacs.
>
> Here's the settings I put in my Emacs app-defaults file (pointed to via
> XUSERFILESEARCHPATH):
>
> ! these take effect just fine:
> FOO.default.attributeForeground: black
> FOO.default.attributeBackground: bisque4
> FOO*menubar.background: LavenderBlush3
> FOO*menubar.foreground: black
>
> ! these however do not:
> FOO*font-lock-builtin-face.attributeForeground: purple4
> FOO*font-lock-comment-face.attributeForeground: palevioletred4
> FOO*font-lock-doc-string-face.attributeForeground: yellow3
> FOO*font-lock-string-face.attributeForeground: yellow2
> FOO*font-lock-variable-face.attributeForeground: turquoise3
> FOO*font-lock-type-face.attributeForeground: steelblue2
> FOO*font-lock-function-name-face.attributeForeground: green3
> FOO*font-lock-warning-face.attributeForeground: red4
> FOO*blue.attributeForeground: blue2
>
> Then when I invoke it like so:
>
> xemacs -vanilla -n FOO
>
> I get warnings like so:
>
> (3) (resource/warning) Bad resource specification encountered: something like
> Emacs*font-lock-string-face.attributeForeground: yellow2
> You should replace the * with a . in order to get proper behavior when
> you use the specifier and/or `set-face-*' functions.
>
> when I bring up and font lock a file.
>
> However, if I use the syntax suggested in the warning:
>
> FOO.font-lock-builtin-face.attributeForeground: purple4
>
> I get no warnings but the font lock settings I was attempting to get are not
> used either.
>
> Anyone have any hints as to the correct way to do this, or is this a bug?
>
> I prefer to setup all this stuff in X Resources over using Custom since the
> former has always worked out better for me in the past than the latter, you
> don't get the wierd color flashes or frame resizing as colors and fonts
> change, etc. Plus now I'm trying to setup different color combos for doing
> different types of work and the X Resource method lends itself to that nicely,
> if I can get it to work correctly.
I think you need to put EmacsFrame in there. Here are my font-lock
XResources:
Emacs*EmacsFrame.font-lock-builtin-face.attributeForeground: LightSteelBlue
Emacs*EmacsFrame.font-lock-comment-face.attributeFont: -dt-application-bold-i-*-*-12-*-*-*-m-*-iso8859-1
Emacs*EmacsFrame.font-lock-comment-face.attributeForeground: grey66
Emacs*EmacsFrame.font-lock-constant-face.attributeForeground: indian red
Emacs*EmacsFrame.font-lock-doc-string-face.attributeForeground: DarkOrange
Emacs*EmacsFrame.font-lock-function-name-face.attributeForeground: aquamarine
Emacs*EmacsFrame.font-lock-keyword-face.attributeForeground: LightCoral
Emacs*EmacsFrame.font-lock-reference-face.attributeForeground: aquamarine
Emacs*EmacsFrame.font-lock-string-face.attributeForeground: cadetblue2
Emacs*EmacsFrame.font-lock-type-face.attributeForeground: LightCoral
Emacs*EmacsFrame.font-lock-variable-name-face.attributeForeground: aquamarine
Emacs*EmacsFrame.font-lock-warning-face.attributeFont: -dt-application-bold-r-*-*-12-*-*-*-m-*-iso8859-1
Emacs*EmacsFrame.font-lock-warning-face.attributeForeground: Pink
HTH,
Vin
--
In a minute there is time
For decisions and revisions which a minute will reverse. T.S. Eliot
[URL: http://www.cs.amherst.edu/~ccm/prufrock.html]
More information about the XEmacs-Beta
mailing list