389 |
Lisp_Object Qface; |
Lisp_Object Qface; |
390 |
extern Lisp_Object Qmouse_face; |
extern Lisp_Object Qmouse_face; |
391 |
|
|
392 |
|
/* Property for basic faces which other faces cannot inherit. */ |
393 |
|
|
394 |
|
Lisp_Object Qface_no_inherit; |
395 |
|
|
396 |
/* Error symbol for wrong_type_argument in load_pixmap. */ |
/* Error symbol for wrong_type_argument in load_pixmap. */ |
397 |
|
|
398 |
Lisp_Object Qbitmap_spec_p; |
Lisp_Object Qbitmap_spec_p; |
3948 |
depend on the face, make sure they are all removed. This is done |
depend on the face, make sure they are all removed. This is done |
3949 |
by incrementing face_change_count. The next call to |
by incrementing face_change_count. The next call to |
3950 |
init_iterator will then free realized faces. */ |
init_iterator will then free realized faces. */ |
3951 |
++face_change_count; |
if (NILP (Fget (face, Qface_no_inherit))) |
3952 |
++windows_or_buffers_changed; |
{ |
3953 |
|
++face_change_count; |
3954 |
|
++windows_or_buffers_changed; |
3955 |
|
} |
3956 |
|
|
3957 |
xassert (LFACEP (lface)); |
xassert (LFACEP (lface)); |
3958 |
check_lface (lface); |
check_lface (lface); |
4027 |
depend on the face, make sure they are all removed. This is done |
depend on the face, make sure they are all removed. This is done |
4028 |
by incrementing face_change_count. The next call to |
by incrementing face_change_count. The next call to |
4029 |
init_iterator will then free realized faces. */ |
init_iterator will then free realized faces. */ |
4030 |
++face_change_count; |
if (NILP (Fget (to, Qface_no_inherit))) |
4031 |
++windows_or_buffers_changed; |
{ |
4032 |
|
++face_change_count; |
4033 |
|
++windows_or_buffers_changed; |
4034 |
|
} |
4035 |
|
|
4036 |
return to; |
return to; |
4037 |
} |
} |
4395 |
by incrementing face_change_count. The next call to |
by incrementing face_change_count. The next call to |
4396 |
init_iterator will then free realized faces. */ |
init_iterator will then free realized faces. */ |
4397 |
if (!EQ (frame, Qt) |
if (!EQ (frame, Qt) |
4398 |
|
&& NILP (Fget (face, Qface_no_inherit)) |
4399 |
&& (EQ (attr, QCfont) |
&& (EQ (attr, QCfont) |
4400 |
|| EQ (attr, QCfontset) |
|| EQ (attr, QCfontset) |
4401 |
|| NILP (Fequal (old_value, value)))) |
|| NILP (Fequal (old_value, value)))) |
4549 |
struct frame *f; |
struct frame *f; |
4550 |
Lisp_Object param, new_value; |
Lisp_Object param, new_value; |
4551 |
{ |
{ |
4552 |
|
Lisp_Object face = Qnil; |
4553 |
Lisp_Object lface; |
Lisp_Object lface; |
4554 |
|
|
4555 |
/* If there are no faces yet, give up. This is the case when called |
/* If there are no faces yet, give up. This is the case when called |
4558 |
if (NILP (f->face_alist)) |
if (NILP (f->face_alist)) |
4559 |
return; |
return; |
4560 |
|
|
|
/* Changing a named face means that all realized faces depending on |
|
|
that face are invalid. Since we cannot tell which realized faces |
|
|
depend on the face, make sure they are all removed. This is done |
|
|
by incrementing face_change_count. The next call to |
|
|
init_iterator will then free realized faces. */ |
|
|
++face_change_count; |
|
|
++windows_or_buffers_changed; |
|
|
|
|
4561 |
if (EQ (param, Qforeground_color)) |
if (EQ (param, Qforeground_color)) |
4562 |
{ |
{ |
4563 |
lface = lface_from_face_name (f, Qdefault, 1); |
face = Qdefault; |
4564 |
|
lface = lface_from_face_name (f, face, 1); |
4565 |
LFACE_FOREGROUND (lface) = (STRINGP (new_value) |
LFACE_FOREGROUND (lface) = (STRINGP (new_value) |
4566 |
? new_value : Qunspecified); |
? new_value : Qunspecified); |
4567 |
realize_basic_faces (f); |
realize_basic_faces (f); |
4576 |
XSETFRAME (frame, f); |
XSETFRAME (frame, f); |
4577 |
call1 (Qframe_update_face_colors, frame); |
call1 (Qframe_update_face_colors, frame); |
4578 |
|
|
4579 |
lface = lface_from_face_name (f, Qdefault, 1); |
face = Qdefault; |
4580 |
|
lface = lface_from_face_name (f, face, 1); |
4581 |
LFACE_BACKGROUND (lface) = (STRINGP (new_value) |
LFACE_BACKGROUND (lface) = (STRINGP (new_value) |
4582 |
? new_value : Qunspecified); |
? new_value : Qunspecified); |
4583 |
realize_basic_faces (f); |
realize_basic_faces (f); |
4584 |
} |
} |
4585 |
if (EQ (param, Qborder_color)) |
else if (EQ (param, Qborder_color)) |
4586 |
{ |
{ |
4587 |
lface = lface_from_face_name (f, Qborder, 1); |
face = Qborder; |
4588 |
|
lface = lface_from_face_name (f, face, 1); |
4589 |
LFACE_BACKGROUND (lface) = (STRINGP (new_value) |
LFACE_BACKGROUND (lface) = (STRINGP (new_value) |
4590 |
? new_value : Qunspecified); |
? new_value : Qunspecified); |
4591 |
} |
} |
4592 |
else if (EQ (param, Qcursor_color)) |
else if (EQ (param, Qcursor_color)) |
4593 |
{ |
{ |
4594 |
lface = lface_from_face_name (f, Qcursor, 1); |
face = Qcursor; |
4595 |
|
lface = lface_from_face_name (f, face, 1); |
4596 |
LFACE_BACKGROUND (lface) = (STRINGP (new_value) |
LFACE_BACKGROUND (lface) = (STRINGP (new_value) |
4597 |
? new_value : Qunspecified); |
? new_value : Qunspecified); |
4598 |
} |
} |
4599 |
else if (EQ (param, Qmouse_color)) |
else if (EQ (param, Qmouse_color)) |
4600 |
{ |
{ |
4601 |
lface = lface_from_face_name (f, Qmouse, 1); |
face = Qmouse; |
4602 |
|
lface = lface_from_face_name (f, face, 1); |
4603 |
LFACE_BACKGROUND (lface) = (STRINGP (new_value) |
LFACE_BACKGROUND (lface) = (STRINGP (new_value) |
4604 |
? new_value : Qunspecified); |
? new_value : Qunspecified); |
4605 |
} |
} |
4606 |
|
|
4607 |
|
/* Changing a named face means that all realized faces depending on |
4608 |
|
that face are invalid. Since we cannot tell which realized faces |
4609 |
|
depend on the face, make sure they are all removed. This is done |
4610 |
|
by incrementing face_change_count. The next call to |
4611 |
|
init_iterator will then free realized faces. */ |
4612 |
|
if (!NILP (face) |
4613 |
|
&& NILP (Fget (face, Qface_no_inherit))) |
4614 |
|
{ |
4615 |
|
++face_change_count; |
4616 |
|
++windows_or_buffers_changed; |
4617 |
|
} |
4618 |
} |
} |
4619 |
|
|
4620 |
|
|
7972 |
{ |
{ |
7973 |
Qface = intern ("face"); |
Qface = intern ("face"); |
7974 |
staticpro (&Qface); |
staticpro (&Qface); |
7975 |
|
Qface_no_inherit = intern ("face-no-inherit"); |
7976 |
|
staticpro (&Qface_no_inherit); |
7977 |
Qbitmap_spec_p = intern ("bitmap-spec-p"); |
Qbitmap_spec_p = intern ("bitmap-spec-p"); |
7978 |
staticpro (&Qbitmap_spec_p); |
staticpro (&Qbitmap_spec_p); |
7979 |
Qframe_update_face_colors = intern ("frame-update-face-colors"); |
Qframe_update_face_colors = intern ("frame-update-face-colors"); |