Paul Stodghill <stodghil(a)cs.cornell.edu> writes:
>
> Would something like the following make sense?
That is more like the old 'save-initial-default-font' solution. Try
this one instead. This makes x-init-face-from-resources actually
work like I described. i.e. if there have been no previous
customizations, then apply the resources. As a bonus this also fixes
the "background color reverts to grey when using font-menu problems"
by slightly changing the way custom interacts with resources (custom
now only overrides those resources you actually set).
[patch deleted]
With your patch, x-init-global faces doesn't correctly detect that 'default
has been initialized from the X resources because these values are registered
under the 'x tag, not the 'default tag.
Here is a patch which checks both 'x and 'default. It also caused the font
name specified by the X resources to be registered using the 'x tag.
I'm sure that my patch breaks something else, but it appears to work in
situation better than yours.
Wanna do another iteration of patches? :-)
smithers% diff -u xemacs-21.0.63/lisp/x-faces.el.saved xemacs-21.0.63/lisp/x-faces.el
--- xemacs-21.0.63/lisp/x-faces.el.saved Wed Feb 17 16:36:58 1999
+++ xemacs-21.0.63/lisp/x-faces.el Wed Feb 17 16:34:58 1999
@@ -506,7 +506,7 @@
;; globally. This means we should override global
;; defaults for all X device classes.
(remove-specifier (face-font face) locale x-tag-set nil))
- (set-face-font face fn locale nil append))
+ (set-face-font face fn locale 'x append))
;; Kludge-o-rooni. Set the foreground and background resources for
;; X devices only -- otherwise things tend to get all messed up
;; if you start up an X frame and then later create a TTY frame.
@@ -600,14 +600,17 @@
;;; specified.
;;;
(defun x-init-global-faces ()
- (or (face-font 'default 'global)
+ (or (face-font 'default 'global '(default))
+ (face-font 'default 'global '(x))
(set-face-font 'default
- "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*")
- 'global)
- (or (face-foreground 'default 'global)
- (set-face-foreground 'default "black" 'global 'x))
- (or (face-background 'default 'global)
- (set-face-background 'default "gray80" 'global 'x)))
+ "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*"
+ 'global '(x default)))
+ (or (face-foreground 'default 'global '(default))
+ (face-foreground 'default 'global '(x))
+ (set-face-foreground 'default "black" 'global '(x default)))
+ (or (face-background 'default 'global '(default))
+ (face-background 'default 'global '(x))
+ (set-face-background 'default "gray80" 'global '(x
default))))
;;; x-init-device-faces is responsible for initializing default
;;; values for faces on a newly created device.
smithers%