This patch makes the code in face-spec-set actually work like it was
supposed to. It makes the interaction between resources and custom for
the default face to be the same as for the other fonts. Properties of
the font not touched by custom now take the value specified by the
resource if there was one. From the bug reports on xemacs-beta this
seems to the behaviour expected by a lot of testers [Setting the font
using the menu no longer changes the colors of the face for instance].
The big open questions are now: Is this is indeed the right semantics
for custom settings (note that it already was this way for all faces
except the default font)? What is the behaviour of Emacs 20.3? I
cannot test what it does.
Allthough this introduces subtle changes in the font init process and
thus requires another full test cycle, I am convinced now that it is
important this behaviour is changed for 21.0.
1999-02-19 Jan Vroonhof <vroonhof(a)math.ethz.ch>
* x-faces.el (x-init-global-faces): Add default tag to specifiers,
so they can be overridden by x-init-face-from-resources.
Additionally specify the font name also with an x tag.
bolzano:/scratch/vroonhof/cvs/xemacs-20> cvs diff lisp/x-faces.el
Index: lisp/x-faces.el
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs-20/lisp/x-faces.el,v
retrieving revision 1.12
diff -u -r1.12 x-faces.el
--- x-faces.el 1998/07/10 02:49:02 1.12
+++ x-faces.el 1999/02/19 22:29:03
@@ -602,12 +602,12 @@
(defun x-init-global-faces ()
(or (face-font 'default 'global)
(set-face-font 'default
- "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*")
- 'global)
+ "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*"
+ 'global '(x default)))
(or (face-foreground 'default 'global)
- (set-face-foreground 'default "black" 'global 'x))
+ (set-face-foreground 'default "black" 'global '(x default)))
(or (face-background 'default 'global)
- (set-face-background 'default "gray80" '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.
bolzano:/scratch/vroonhof/cvs/xemacs-20>
--
Jan Vroonhof
http://www.math.ethz.ch/~vroonhof/
Mathematik, vroonhof @ math.ethz.ch
HG E16, ETH-Zentrum, Tel: +41-1-6325456/25154
Raemistrasse 101, CH-8092 Zuerich. Fax: +41-1-6321085