Mercurial > hg > xemacs-beta
comparison lisp/x-faces.el @ 412:697ef44129c6 r21-2-14
Import from CVS: tag r21-2-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:20:41 +0200 |
parents | de805c49cfc1 |
children |
comparison
equal
deleted
inserted
replaced
411:12e008d41344 | 412:697ef44129c6 |
---|---|
1 ;;; x-faces.el --- X-specific face frobnication, aka black magic. | 1 ;;; x-faces.el --- X-specific face frobnication, aka black magic. |
2 | 2 |
3 ;; Copyright (C) 1992-4, 1997 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1992-4, 1997 Free Software Foundation, Inc. |
4 ;; Copyright (C) 1995, 1996 Ben Wing. | 4 ;; Copyright (C) 1995, 1996 Ben Wing. |
5 | 5 |
6 ;; Author: Jamie Zawinski <jwz@jwz.org> | 6 ;; Author: Jamie Zawinski <jwz@netscape.com> |
7 ;; Maintainer: XEmacs Development Team | 7 ;; Maintainer: XEmacs Development Team |
8 ;; Keywords: extensions, internal, dumped | 8 ;; Keywords: extensions, internal, dumped |
9 | 9 |
10 ;; This file is part of XEmacs. | 10 ;; This file is part of XEmacs. |
11 | 11 |
490 (if (and (or (eq (face-name face) 'default) | 490 (if (and (or (eq (face-name face) 'default) |
491 (eq (face-name face) 'gui-element)) | 491 (eq (face-name face) 'gui-element)) |
492 (or (null locale) (eq locale 'global))) | 492 (or (null locale) (eq locale 'global))) |
493 (progn | 493 (progn |
494 (or fn (setq fn (x-get-resource | 494 (or fn (setq fn (x-get-resource |
495 "font" "Font" 'string locale nil 'warn))) | 495 "font" "Font" 'string locale))) |
496 (or fg (setq fg (x-get-resource | 496 (or fg (setq fg (x-get-resource |
497 "foreground" "Foreground" 'string locale nil | 497 "foreground" "Foreground" 'string locale))) |
498 'warn))) | |
499 (or bg (setq bg (x-get-resource | 498 (or bg (setq bg (x-get-resource |
500 "background" "Background" 'string locale nil | 499 "background" "Background" 'string locale))))) |
501 'warn))))) | |
502 ;; | 500 ;; |
503 ;; "*cursorColor: foo" is equivalent to setting the background of the | 501 ;; "*cursorColor: foo" is equivalent to setting the background of the |
504 ;; text-cursor face. | 502 ;; text-cursor face. |
505 ;; | 503 ;; |
506 (if (and (eq (face-name face) 'text-cursor) | 504 (if (and (eq (face-name face) 'text-cursor) |
507 (or (null locale) (eq locale 'global))) | 505 (or (null locale) (eq locale 'global))) |
508 (setq bg (or (x-get-resource | 506 (setq bg (or (x-get-resource |
509 "cursorColor" "CursorColor" 'string locale nil 'warn) | 507 "cursorColor" "CursorColor" 'string locale) bg))) |
510 bg))) | |
511 ;; #### should issue warnings? I think this should be | 508 ;; #### should issue warnings? I think this should be |
512 ;; done when the instancing actually happens, but I'm not | 509 ;; done when the instancing actually happens, but I'm not |
513 ;; sure how it should actually be dealt with. | 510 ;; sure how it should actually be dealt with. |
514 (when fn | 511 (when fn |
515 (if device-class | 512 (if device-class |
736 | 733 |
737 ;; | 734 ;; |
738 ;; If reverseVideo was specified, swap the foreground and background | 735 ;; If reverseVideo was specified, swap the foreground and background |
739 ;; of the default and modeline faces. | 736 ;; of the default and modeline faces. |
740 ;; | 737 ;; |
741 (cond ((car (x-get-resource "reverseVideo" "ReverseVideo" 'boolean frame | 738 (cond ((car (x-get-resource "reverseVideo" "ReverseVideo" 'boolean frame)) |
742 nil 'warn)) | |
743 ;; First make sure the modeline has fg and bg, inherited from the | 739 ;; First make sure the modeline has fg and bg, inherited from the |
744 ;; current default face - for the case where only one is specified, | 740 ;; current default face - for the case where only one is specified, |
745 ;; so that invert-face doesn't do something weird. | 741 ;; so that invert-face doesn't do something weird. |
746 (or (face-foreground 'modeline frame) | 742 (or (face-foreground 'modeline frame) |
747 (set-face-foreground 'modeline | 743 (set-face-foreground 'modeline |