problems setting up font lock via X Resources

Charles Hines chuck.hines at baesystems.com
Mon Feb 9 11:15:15 EST 2004


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.

Thanks,
Chuck

-- 
Charles K. Hines   <ckh at requesttech.com>   <chuck.hines at baesystems.com>
Principal Scientist at ReQuest Technologies Inc. (http://www.ReQuestTech.com/)

  "My cubicle is sucking the life force out of me.  I mean, it always has,
   but it seems like it's happening faster now."         - Dilbert




More information about the XEmacs-Beta mailing list