7691 |
|
|
7692 |
F is frame where faces are (to be) realized. |
F is frame where faces are (to be) realized. |
7693 |
|
|
7694 |
FACE_NAME is named face to merge, or if nil, |
FACE_NAME is named face to merge. |
7695 |
FACE_ID is face_id of realized face to merge. |
|
7696 |
|
If FACE_NAME is nil, FACE_ID is face_id of realized face to merge. |
7697 |
|
|
7698 |
|
If FACE_NAME is t, FACE_ID is lface_id of face to merge. |
7699 |
|
|
7700 |
BASE_FACE_ID is realized face to merge into. |
BASE_FACE_ID is realized face to merge into. |
7701 |
|
|
7702 |
Return new face. |
Return new face id. |
7703 |
*/ |
*/ |
7704 |
|
|
7705 |
int |
int |
7706 |
merge_into_realized_face (f, face_name, face_id, base_face_id) |
merge_faces (f, face_name, face_id, base_face_id) |
7707 |
struct frame *f; |
struct frame *f; |
7708 |
Lisp_Object face_name; |
Lisp_Object face_name; |
7709 |
int face_id, base_face_id; |
int face_id, base_face_id; |
7715 |
if (!base_face) |
if (!base_face) |
7716 |
return base_face_id; |
return base_face_id; |
7717 |
|
|
7718 |
|
if (EQ (face_name, Qt)) |
7719 |
|
{ |
7720 |
|
if (face_id < 0 || face_id >= lface_id_to_name_size) |
7721 |
|
return base_face_id; |
7722 |
|
face_name = lface_id_to_name[face_id]; |
7723 |
|
face_id = lookup_derived_face (f, face_name, 0, base_face_id); |
7724 |
|
if (face_id >= 0) |
7725 |
|
return face_id; |
7726 |
|
return base_face_id; |
7727 |
|
} |
7728 |
|
|
7729 |
/* Begin with attributes from the base face. */ |
/* Begin with attributes from the base face. */ |
7730 |
bcopy (base_face->lface, attrs, sizeof attrs); |
bcopy (base_face->lface, attrs, sizeof attrs); |
7731 |
|
|
7737 |
else |
else |
7738 |
{ |
{ |
7739 |
struct face *face; |
struct face *face; |
7740 |
|
if (face_id < 0) |
7741 |
|
return base_face_id; |
7742 |
face = FACE_FROM_ID (f, face_id); |
face = FACE_FROM_ID (f, face_id); |
7743 |
if (!face) |
if (!face) |
7744 |
return base_face_id; |
return base_face_id; |