<p>
Before I do a fix an unclear behaviour has to be clarified. See the following script:

<verbatim>
pack [text .t]
.t insert end "Line 1"
.t tag configure stdout -background yellow
#.t tag raise sel
.t tag add stdout 1.0 end
.t tag add sel 1.1 1.3
focus .t
</verbatim>

<p>
This shows a line with yellow background, the selection background is ignored, but the selected text is displayed with the selection foreground.

<ol>
<li>I would expect that the selection foreground will be ignored if the selection background is ignored, although this behaviour would be an exceptional case, because normally the tag priority is decisive.
<li>The current behaviour for the selection background is okay, because if the user wants that the selection background has higher priority then he can raise the sel tag. Otherwise, if I read the chapter "THE SELECTION", then it sounds as if the sel tag attributes have highest priority anyway. But this would restrict the formatting capability. Probably the section "THE SELECTION" has to be changed a bit, to make it clear that the priority of the tags is decisive.
</ol>

<p>
What do you think?