comparison lisp/faces.el @ 424:11054d720c21 r21-2-20

Import from CVS: tag r21-2-20
author cvs
date Mon, 13 Aug 2007 11:26:11 +0200
parents ebe98a74bd68
children
comparison
equal deleted inserted replaced
423:28d9c139be4c 424:11054d720c21
832 ;; inherits its font from 'default. 832 ;; inherits its font from 'default.
833 ;; (2) if we're frobbing a particular locale, nothing would 833 ;; (2) if we're frobbing a particular locale, nothing would
834 ;; happen if that locale has no instantiators. So signal 834 ;; happen if that locale has no instantiators. So signal
835 ;; an error to indicate this. 835 ;; an error to indicate this.
836 836
837 (setq temp-sp 837
838 (if (and (or (eq locale 'global) (eq locale 'all) (not locale)) 838 (setq temp-sp (copy-specifier sp))
839 (not (face-property face property 'global))) 839 (if (and (or (eq locale 'global) (eq locale 'all) (not locale))
840 (copy-specifier (face-property 'default property) 840 (not (face-property face property 'global)))
841 nil 'global) 841 (copy-specifier (face-property 'default property)
842 sp)) 842 temp-sp 'global))
843 (if (and (valid-specifier-locale-p locale) 843 (if (and (valid-specifier-locale-p locale)
844 (not (specifier-specs temp-sp locale))) 844 (not (specifier-specs temp-sp locale)))
845 (error "Property must have a specification in locale %S" locale)) 845 (error "Property must have a specification in locale %S" locale))
846 (map-specifier 846 (map-specifier
847 temp-sp 847 temp-sp
1408 (x-init-device-faces device)) 1408 (x-init-device-faces device))
1409 ((eq 'mswindows (device-type device)) 1409 ((eq 'mswindows (device-type device))
1410 (mswindows-init-device-faces device)) 1410 (mswindows-init-device-faces device))
1411 ;; Nothing to do for TTYs? 1411 ;; Nothing to do for TTYs?
1412 ) 1412 )
1413 (init-other-random-faces device))) 1413 (or (eq 'stream (device-type device))
1414 (init-other-random-faces device))))
1414 1415
1415 (defun init-frame-faces (frame) 1416 (defun init-frame-faces (frame)
1416 (when init-face-from-resources 1417 (when init-face-from-resources
1417 ;; First, add any frame-local face resources. 1418 ;; First, add any frame-local face resources.
1418 (loop for face in (face-list) do 1419 (loop for face in (face-list) do
1616 (make-face 'underline "Underlined text.") 1617 (make-face 'underline "Underlined text.")
1617 (or (face-differs-from-default-p 'underline) 1618 (or (face-differs-from-default-p 'underline)
1618 (set-face-underline-p 'underline t 'global '(default))) 1619 (set-face-underline-p 'underline t 'global '(default)))
1619 (make-face 'zmacs-region "Used on highlightes region between point and mark.") 1620 (make-face 'zmacs-region "Used on highlightes region between point and mark.")
1620 (make-face 'isearch "Used on region matched by isearch.") 1621 (make-face 'isearch "Used on region matched by isearch.")
1622 (make-face 'isearch-secondary "Face to use for highlighting all matches.")
1621 (make-face 'list-mode-item-selected 1623 (make-face 'list-mode-item-selected
1622 "Face for the selected list item in list-mode.") 1624 "Face for the selected list item in list-mode.")
1623 (make-face 'highlight "Highlight face.") 1625 (make-face 'highlight "Highlight face.")
1624 (make-face 'primary-selection "Primary selection face.") 1626 (make-face 'primary-selection "Primary selection face.")
1625 (make-face 'secondary-selection "Secondary selection face.") 1627 (make-face 'secondary-selection "Secondary selection face.")
1703 (set-face-background 'isearch 1705 (set-face-background 'isearch
1704 '(((x default color) . "paleturquoise") 1706 '(((x default color) . "paleturquoise")
1705 ((x default color) . "green") 1707 ((x default color) . "green")
1706 ((mswindows default color) . "paleturquoise") 1708 ((mswindows default color) . "paleturquoise")
1707 ((mswindows default color) . "green")) 1709 ((mswindows default color) . "green"))
1710 'global)
1711
1712 ;; #### This should really, I mean *really*, be converted to some form
1713 ;; of `defface' one day.
1714 (set-face-foreground 'isearch-secondary
1715 '(((x default color) . "red3")
1716 ((mswindows default color) . "red3"))
1708 'global) 1717 'global)
1709 1718
1710 ;; Define some logical color names to be used when reading the pixmap files. 1719 ;; Define some logical color names to be used when reading the pixmap files.
1711 (if (featurep 'xpm) 1720 (if (featurep 'xpm)
1712 (setq xpm-color-symbols 1721 (setq xpm-color-symbols