385 |
Lisp_Object Qface; |
Lisp_Object Qface; |
386 |
extern Lisp_Object Qmouse_face; |
extern Lisp_Object Qmouse_face; |
387 |
|
|
388 |
|
/* Property for basic faces which other faces cannot inherit. */ |
389 |
|
|
390 |
|
Lisp_Object Qface_no_inherit; |
391 |
|
|
392 |
/* Error symbol for wrong_type_argument in load_pixmap. */ |
/* Error symbol for wrong_type_argument in load_pixmap. */ |
393 |
|
|
394 |
Lisp_Object Qbitmap_spec_p; |
Lisp_Object Qbitmap_spec_p; |
3869 |
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 |
3870 |
by incrementing face_change_count. The next call to |
by incrementing face_change_count. The next call to |
3871 |
init_iterator will then free realized faces. */ |
init_iterator will then free realized faces. */ |
3872 |
++face_change_count; |
if (NILP (Fget (face, Qface_no_inherit))) |
3873 |
++windows_or_buffers_changed; |
{ |
3874 |
|
++face_change_count; |
3875 |
|
++windows_or_buffers_changed; |
3876 |
|
} |
3877 |
|
|
3878 |
xassert (LFACEP (lface)); |
xassert (LFACEP (lface)); |
3879 |
check_lface (lface); |
check_lface (lface); |
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 (to, Qface_no_inherit))) |
3952 |
++windows_or_buffers_changed; |
{ |
3953 |
|
++face_change_count; |
3954 |
|
++windows_or_buffers_changed; |
3955 |
|
} |
3956 |
|
|
3957 |
return to; |
return to; |
3958 |
} |
} |
4309 |
by incrementing face_change_count. The next call to |
by incrementing face_change_count. The next call to |
4310 |
init_iterator will then free realized faces. */ |
init_iterator will then free realized faces. */ |
4311 |
if (!EQ (frame, Qt) |
if (!EQ (frame, Qt) |
4312 |
|
&& NILP (Fget (face, Qface_no_inherit)) |
4313 |
&& (EQ (attr, QCfont) |
&& (EQ (attr, QCfont) |
4314 |
|| NILP (Fequal (old_value, value)))) |
|| NILP (Fequal (old_value, value)))) |
4315 |
{ |
{ |
4462 |
struct frame *f; |
struct frame *f; |
4463 |
Lisp_Object param, new_value; |
Lisp_Object param, new_value; |
4464 |
{ |
{ |
4465 |
|
Lisp_Object face = Qnil; |
4466 |
Lisp_Object lface; |
Lisp_Object lface; |
4467 |
|
|
4468 |
/* 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 |
4471 |
if (NILP (f->face_alist)) |
if (NILP (f->face_alist)) |
4472 |
return; |
return; |
4473 |
|
|
|
/* 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; |
|
|
|
|
4474 |
if (EQ (param, Qforeground_color)) |
if (EQ (param, Qforeground_color)) |
4475 |
{ |
{ |
4476 |
lface = lface_from_face_name (f, Qdefault, 1); |
face = Qdefault; |
4477 |
|
lface = lface_from_face_name (f, face, 1); |
4478 |
LFACE_FOREGROUND (lface) = (STRINGP (new_value) |
LFACE_FOREGROUND (lface) = (STRINGP (new_value) |
4479 |
? new_value : Qunspecified); |
? new_value : Qunspecified); |
4480 |
realize_basic_faces (f); |
realize_basic_faces (f); |
4489 |
XSETFRAME (frame, f); |
XSETFRAME (frame, f); |
4490 |
call1 (Qframe_update_face_colors, frame); |
call1 (Qframe_update_face_colors, frame); |
4491 |
|
|
4492 |
lface = lface_from_face_name (f, Qdefault, 1); |
face = Qdefault; |
4493 |
|
lface = lface_from_face_name (f, face, 1); |
4494 |
LFACE_BACKGROUND (lface) = (STRINGP (new_value) |
LFACE_BACKGROUND (lface) = (STRINGP (new_value) |
4495 |
? new_value : Qunspecified); |
? new_value : Qunspecified); |
4496 |
realize_basic_faces (f); |
realize_basic_faces (f); |
4497 |
} |
} |
4498 |
if (EQ (param, Qborder_color)) |
else if (EQ (param, Qborder_color)) |
4499 |
{ |
{ |
4500 |
lface = lface_from_face_name (f, Qborder, 1); |
face = Qborder; |
4501 |
|
lface = lface_from_face_name (f, face, 1); |
4502 |
LFACE_BACKGROUND (lface) = (STRINGP (new_value) |
LFACE_BACKGROUND (lface) = (STRINGP (new_value) |
4503 |
? new_value : Qunspecified); |
? new_value : Qunspecified); |
4504 |
} |
} |
4505 |
else if (EQ (param, Qcursor_color)) |
else if (EQ (param, Qcursor_color)) |
4506 |
{ |
{ |
4507 |
lface = lface_from_face_name (f, Qcursor, 1); |
face = Qcursor; |
4508 |
|
lface = lface_from_face_name (f, face, 1); |
4509 |
LFACE_BACKGROUND (lface) = (STRINGP (new_value) |
LFACE_BACKGROUND (lface) = (STRINGP (new_value) |
4510 |
? new_value : Qunspecified); |
? new_value : Qunspecified); |
4511 |
} |
} |
4512 |
else if (EQ (param, Qmouse_color)) |
else if (EQ (param, Qmouse_color)) |
4513 |
{ |
{ |
4514 |
lface = lface_from_face_name (f, Qmouse, 1); |
face = Qmouse; |
4515 |
|
lface = lface_from_face_name (f, face, 1); |
4516 |
LFACE_BACKGROUND (lface) = (STRINGP (new_value) |
LFACE_BACKGROUND (lface) = (STRINGP (new_value) |
4517 |
? new_value : Qunspecified); |
? new_value : Qunspecified); |
4518 |
} |
} |
4519 |
|
|
4520 |
|
/* Changing a named face means that all realized faces depending on |
4521 |
|
that face are invalid. Since we cannot tell which realized faces |
4522 |
|
depend on the face, make sure they are all removed. This is done |
4523 |
|
by incrementing face_change_count. The next call to |
4524 |
|
init_iterator will then free realized faces. */ |
4525 |
|
if (!NILP (face) |
4526 |
|
&& NILP (Fget (face, Qface_no_inherit))) |
4527 |
|
{ |
4528 |
|
++face_change_count; |
4529 |
|
++windows_or_buffers_changed; |
4530 |
|
} |
4531 |
} |
} |
4532 |
|
|
4533 |
|
|
7779 |
{ |
{ |
7780 |
Qface = intern ("face"); |
Qface = intern ("face"); |
7781 |
staticpro (&Qface); |
staticpro (&Qface); |
7782 |
|
Qface_no_inherit = intern ("face-no-inherit"); |
7783 |
|
staticpro (&Qface_no_inherit); |
7784 |
Qbitmap_spec_p = intern ("bitmap-spec-p"); |
Qbitmap_spec_p = intern ("bitmap-spec-p"); |
7785 |
staticpro (&Qbitmap_spec_p); |
staticpro (&Qbitmap_spec_p); |
7786 |
Qframe_update_face_colors = intern ("frame-update-face-colors"); |
Qframe_update_face_colors = intern ("frame-update-face-colors"); |