comparison lisp/x-faces.el @ 269:b2472a1930f2 r20-5b33

Import from CVS: tag r20-5b33
author cvs
date Mon, 13 Aug 2007 10:27:19 +0200
parents 8efd647ea9ca
children c5d627a313b1
comparison
equal deleted inserted replaced
268:6ced69ccd85f 269:b2472a1930f2
516 "cursorColor" "CursorColor" 'string locale) bg))) 516 "cursorColor" "CursorColor" 'string locale) bg)))
517 ;; #### should issue warnings? I think this should be 517 ;; #### should issue warnings? I think this should be
518 ;; done when the instancing actually happens, but I'm not 518 ;; done when the instancing actually happens, but I'm not
519 ;; sure how it should actually be dealt with. 519 ;; sure how it should actually be dealt with.
520 (when fn 520 (when fn
521 ;; Always use the x-tag-set to remove specs, since we don't 521 (if device-class
522 ;; know whether the predumped face was initialized with an 522 ;; Always use the x-tag-set to remove specs, since we don't
523 ;; 'x tag or not. 523 ;; know whether the predumped face was initialized with an
524 (remove-specifier-specs-matching-tag-set-cdrs (face-font face) 524 ;; 'x tag or not.
525 locale 525 (remove-specifier-specs-matching-tag-set-cdrs (face-font face)
526 x-tag-set) 526 locale
527 x-tag-set)
528 ;; If there's no device class then we're initializing
529 ;; globally. This means we should override global
530 ;; defaults for all X device classes.
531 (remove-specifier (face-font face) locale x-tag-set nil))
527 (set-face-font face fn locale nil append)) 532 (set-face-font face fn locale nil append))
528 ;; Kludge-o-rooni. Set the foreground and background resources for 533 ;; Kludge-o-rooni. Set the foreground and background resources for
529 ;; X devices only -- otherwise things tend to get all messed up 534 ;; X devices only -- otherwise things tend to get all messed up
530 ;; if you start up an X frame and then later create a TTY frame. 535 ;; if you start up an X frame and then later create a TTY frame.
531 (when fg 536 (when fg
532 (remove-specifier-specs-matching-tag-set-cdrs (face-foreground face) 537 (if device-class
533 locale 538 (remove-specifier-specs-matching-tag-set-cdrs (face-foreground face)
534 x-tag-set) 539 locale
540 x-tag-set)
541 (remove-specifier (face-foreground face) locale x-tag-set nil))
535 (set-face-foreground face fg locale 'x append)) 542 (set-face-foreground face fg locale 'x append))
536 (when bg 543 (when bg
537 (remove-specifier-specs-matching-tag-set-cdrs (face-background face) 544 (if device-class
538 locale 545 (remove-specifier-specs-matching-tag-set-cdrs (face-background face)
539 x-tag-set) 546 locale
547 x-tag-set)
548 (remove-specifier (face-background face) locale x-tag-set nil))
540 (set-face-background face bg locale 'x append)) 549 (set-face-background face bg locale 'x append))
541 (when bgp 550 (when bgp
542 (remove-specifier-specs-matching-tag-set-cdrs (face-background-pixmap 551 (if device-class
543 face) 552 (remove-specifier-specs-matching-tag-set-cdrs (face-background-pixmap
544 locale 553 face)
545 x-tag-set) 554 locale
555 x-tag-set)
556 (remove-specifier (face-background-pixmap face) locale x-tag-set nil))
546 (set-face-background-pixmap face bgp locale nil append)) 557 (set-face-background-pixmap face bgp locale nil append))
547 (when ulp 558 (when ulp
548 (remove-specifier-specs-matching-tag-set-cdrs (face-property 559 (if device-class
549 face 'underline) 560 (remove-specifier-specs-matching-tag-set-cdrs (face-property
550 locale 561 face 'underline)
551 tty-tag-set) 562 locale
563 tty-tag-set)
564 (remove-specifier (face-propery face 'underline) locale
565 tty-tag-set nil))
552 (set-face-underline-p face ulp locale nil append)) 566 (set-face-underline-p face ulp locale nil append))
553 (when stp 567 (when stp
554 (remove-specifier-specs-matching-tag-set-cdrs (face-property 568 (if device-class
555 face 'strikethru) 569 (remove-specifier-specs-matching-tag-set-cdrs (face-property
556 locale 570 face 'strikethru)
557 tty-tag-set) 571 locale
572 tty-tag-set)
573 (remove-specifier (face-propery face 'strikethru)
574 locale tty-tag-set nil))
558 (set-face-strikethru-p face stp locale nil append)) 575 (set-face-strikethru-p face stp locale nil append))
559 (when hp 576 (when hp
560 (remove-specifier-specs-matching-tag-set-cdrs (face-property 577 (if device-class
561 face 'highlight) 578 (remove-specifier-specs-matching-tag-set-cdrs (face-property
562 locale 579 face 'highlight)
563 tty-tag-set) 580 locale
581 tty-tag-set)
582 (remove-specifier (face-propery face 'highlight)
583 locale tty-tag-set nil))
564 (set-face-highlight-p face hp locale nil append)) 584 (set-face-highlight-p face hp locale nil append))
565 (when dp 585 (when dp
566 (remove-specifier-specs-matching-tag-set-cdrs (face-property 586 (if device-class
567 face 'dim) 587 (remove-specifier-specs-matching-tag-set-cdrs (face-property
568 locale 588 face 'dim)
569 tty-tag-set) 589 locale
590 tty-tag-set)
591 (remove-specifier (face-property face 'dim) locale tty-tag-set nil))
570 (set-face-dim-p face dp locale nil append)) 592 (set-face-dim-p face dp locale nil append))
571 (when bp 593 (when bp
572 (remove-specifier-specs-matching-tag-set-cdrs (face-property 594 (if device-class
573 face 'blinking) 595 (remove-specifier-specs-matching-tag-set-cdrs (face-property
574 locale 596 face 'blinking)
575 tty-tag-set) 597 locale
598 tty-tag-set)
599 (remove-specifier (face-propery face 'blinking) locale
600 tty-tag-set nil))
576 (set-face-blinking-p face bp locale nil append)) 601 (set-face-blinking-p face bp locale nil append))
577 (when rp 602 (when rp
578 (remove-specifier-specs-matching-tag-set-cdrs (face-property 603 (if device-class
579 face 'reverse) 604 (remove-specifier-specs-matching-tag-set-cdrs (face-property
580 locale 605 face 'reverse)
581 tty-tag-set) 606 locale
607 tty-tag-set)
608 (remove-specifier (face-property face 'reverse) locale
609 tty-tag-set nil))
582 (set-face-reverse-p face rp locale nil append)) 610 (set-face-reverse-p face rp locale nil append))
583 )) 611 ))
584 612
585 ;; GNU Emacs compatibility. (move to obsolete.el?) 613 ;; GNU Emacs compatibility. (move to obsolete.el?)
586 (defalias 'make-face-x-resource-internal 'x-init-face-from-resources) 614 (defalias 'make-face-x-resource-internal 'x-init-face-from-resources)
587 615
588 (defun remove-specifier-specs-matching-tag-set-cdrs (specifier locale tag-set) 616 (defun remove-specifier-specs-matching-tag-set-cdrs (specifier locale tag-set)
589 (while tag-set 617 (while tag-set
590 (remove-specifier specifier locale tag-set) 618 (remove-specifier specifier locale tag-set t)
591 (setq tag-set (cdr tag-set)))) 619 (setq tag-set (cdr tag-set))))
592 620
593 ;;; x-init-global-faces is responsible for ensuring that the 621 ;;; x-init-global-faces is responsible for ensuring that the
594 ;;; default face has some reasonable fallbacks if nothing else is 622 ;;; default face has some reasonable fallbacks if nothing else is
595 ;;; specified. 623 ;;; specified.