unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Face precedence
@ 2004-10-29 16:26 Matthew Calhoun
  0 siblings, 0 replies; 8+ messages in thread
From: Matthew Calhoun @ 2004-10-29 16:26 UTC (permalink / raw)


Hello,

I'm trying to figure out what determines the order in which faces are 
applied to a block of text. I have highlight face, which is applied to 
whatever line point is on, defined as white text on a dark background. 
But in programming modes I also have some syntax-related faces defined 
with a light background. Strangely, in some of these modes the 
highlight face's light foreground is applied, but not its dark 
background. Instead, the syntax face's light background is displayed, 
resulting in light text on a light background. What I would like to do 
is make sure that highlight face always takes precedence over whatever 
other faces are applied to the text.

I'm sure this is possible, but I haven't been able to find or figure 
out how. Can anyone point me in the right direction?

Thanks,
Matt

^ permalink raw reply	[flat|nested] 8+ messages in thread
[parent not found: <mailman.6011.1099067730.2017.help-gnu-emacs@gnu.org>]
* Re: Face precedence
@ 2004-11-02 21:23 Matthew Calhoun
  0 siblings, 0 replies; 8+ messages in thread
From: Matthew Calhoun @ 2004-11-02 21:23 UTC (permalink / raw)


Hi Oliver,

Thanks for your reply. I think when I said I was "defining faces" I 
gave you the impression that I was doing something more complicated 
than what I'm actually doing. I'm only setting the attributes of 
existing faces with custom-set-faces, like this:

	(custom-set-faces
		'(mode-line ((((type x w32 mac) (class color)) (:background "white" 
:foreground "black" :weight extra-bold))))
		'(mode-line-inactive ((t (:slant oblique :weight light))))
		'(region ((((class color)) (:background "#b5d5ff"))))
		'(isearch ((t (:inherit region :weight bold))))
		'(isearch-lazy-highlight-face ((((class color) (background light)) 
(:background "#d4d4d4" :foreground "black" :weight bold))))
		'(highlight-changes-face ((((class color)) (:inherit highlight))))
		'(highlight-changes-delete-face ((((class color)) (:box (:line-width 
1 :color "#3d80df")))))
		'(highlight-changes-face-1 ((t (:background "gray80"))) t)
		'(highlight-changes-face-2 ((t (:background "gray90"))) t)
		'(highlight-changes-face-3 ((t (:background "gray95"))) t)
		'(show-paren-match-face ((((class color)) (:foreground "saddle 
brown"))))
		'(show-paren-mismatch-face ((((class color)) (:foreground "red"))))
		'(font-lock-builtin-face ((((class color)) (:foreground "black"))))
		'(font-lock-comment-face ((((class color)) (:foreground "gray50"))))
		'(font-lock-constant-face ((((class color)) (:foreground "black"))))
		'(font-lock-function-name-face ((((class color)) (:foreground "black" 
:weight bold))))
		'(font-lock-keyword-face ((((class color)) (:foreground "black"))))
		'(font-lock-string-face ((((class color)) (:foreground "forest 
green"))))
		'(font-lock-type-face ((((class color)) (:foreground "black"))))
		'(font-lock-variable-name-face ((((class color)) (:foreground 
"blue"))))
		'(font-lock-warning-face ((((class color)) (:foreground "red"))))
		'(html-tag-face ((t (:foreground "dodger blue"))))
		'(html-helper-bold-face ((t (:foreground "black"))))
		'(html-helper-builtin-face ((t (:foreground "black"))))
		'(html-helper-italic-face ((t (:foreground "black"))))
		'(html-helper-underline-face ((t (:foreground "black"))))
		'(cperl-array-face ((((class color) (background light)) (:foreground 
"orange"))))
		'(cperl-hash-face ((((class color) (background light)) (:foreground 
"chocolate4"))))
		'(cperl-nonoverridable-face ((((class color) (background light)) 
nil)))
		'(mmm-default-submode-face ((t (:background "yellow"))))
		'(mmm-cleanup-submode-face ((t (:background "yellow"))))
		'(mmm-code-submode-face ((t (:background "yellow"))))
		'(mmm-comment-submode-face ((t (:background "yellow"))))
		'(mmm-declaration-submode-face ((t (:background "yellow"))))
		'(mmm-output-submode-face ((t (:background "yellow"))))
		'(mmm-special-submode-face ((t (:background "yellow"))))
		'(mmm-init-submode-face ((t (:background "yellow"))))
		'(highlight ((((class color)) (:background "#3d80df" :foreground 
"white"))))
		)

The highlight face I was referring to isn't something I implemented 
myself; it's just an existing face that I've customized. What I'm 
finding confusing is the way in which these faces are applied when more 
than 1 of them is in effect. I would appreciate any light you can shed 
on this subject.

Thanks,
Matt

^ permalink raw reply	[flat|nested] 8+ messages in thread
[parent not found: <mailman.281.1099431126.8225.help-gnu-emacs@gnu.org>]

end of thread, other threads:[~2004-11-08  8:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-29 16:26 Face precedence Matthew Calhoun
     [not found] <mailman.6011.1099067730.2017.help-gnu-emacs@gnu.org>
2004-10-29 21:53 ` Oliver Scholz
  -- strict thread matches above, loose matches on Subject: below --
2004-11-02 21:23 Matthew Calhoun
     [not found] <mailman.281.1099431126.8225.help-gnu-emacs@gnu.org>
2004-11-06  7:01 ` Oliver Scholz
2004-11-06 18:13   ` Matthew Calhoun
     [not found]   ` <mailman.1102.1099775064.8225.help-gnu-emacs@gnu.org>
2004-11-07  7:31     ` Oliver Scholz
2004-11-07 16:48       ` Matthew Calhoun
     [not found]       ` <mailman.1228.1099846667.8225.help-gnu-emacs@gnu.org>
2004-11-08  8:29         ` Oliver Scholz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).