[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/xfaces.c
From: |
Kim F . Storm |
Subject: |
[Emacs-diffs] Changes to emacs/src/xfaces.c |
Date: |
Mon, 10 Jan 2005 09:36:14 -0500 |
Index: emacs/src/xfaces.c
diff -c emacs/src/xfaces.c:1.309 emacs/src/xfaces.c:1.310
*** emacs/src/xfaces.c:1.309 Sun Jan 9 02:05:20 2005
--- emacs/src/xfaces.c Mon Jan 10 13:35:11 2005
***************
*** 7691,7706 ****
F is frame where faces are (to be) realized.
! FACE_NAME is named face to merge, or if nil,
! FACE_ID is face_id of realized face to merge.
BASE_FACE_ID is realized face to merge into.
! Return new face.
*/
int
! merge_into_realized_face (f, face_name, face_id, base_face_id)
struct frame *f;
Lisp_Object face_name;
int face_id, base_face_id;
--- 7691,7709 ----
F is frame where faces are (to be) realized.
! FACE_NAME is named face to merge.
!
! If FACE_NAME is nil, FACE_ID is face_id of realized face to merge.
!
! If FACE_NAME is t, FACE_ID is lface_id of face to merge.
BASE_FACE_ID is realized face to merge into.
! Return new face id.
*/
int
! merge_faces (f, face_name, face_id, base_face_id)
struct frame *f;
Lisp_Object face_name;
int face_id, base_face_id;
***************
*** 7712,7717 ****
--- 7715,7731 ----
if (!base_face)
return base_face_id;
+ if (EQ (face_name, Qt))
+ {
+ if (face_id < 0 || face_id >= lface_id_to_name_size)
+ return base_face_id;
+ face_name = lface_id_to_name[face_id];
+ face_id = lookup_derived_face (f, face_name, 0, base_face_id);
+ if (face_id >= 0)
+ return face_id;
+ return base_face_id;
+ }
+
/* Begin with attributes from the base face. */
bcopy (base_face->lface, attrs, sizeof attrs);
***************
*** 7723,7728 ****
--- 7737,7744 ----
else
{
struct face *face;
+ if (face_id < 0)
+ return base_face_id;
face = FACE_FROM_ID (f, face_id);
if (!face)
return base_face_id;