875 |
if (NILP (frame)) |
if (NILP (frame)) |
876 |
frame = selected_frame; |
frame = selected_frame; |
877 |
|
|
878 |
CHECK_LIVE_FRAME (frame, nparam); |
CHECK_LIVE_FRAME (frame); |
879 |
return XFRAME (frame); |
return XFRAME (frame); |
880 |
} |
} |
881 |
|
|
1490 |
{ |
{ |
1491 |
struct frame *f; |
struct frame *f; |
1492 |
|
|
1493 |
CHECK_FRAME (frame, 0); |
CHECK_FRAME (frame); |
1494 |
CHECK_STRING (color, 0); |
CHECK_STRING (color); |
1495 |
f = XFRAME (frame); |
f = XFRAME (frame); |
1496 |
return face_color_gray_p (f, XSTRING (color)->data) ? Qt : Qnil; |
return face_color_gray_p (f, XSTRING (color)->data) ? Qt : Qnil; |
1497 |
} |
} |
1508 |
{ |
{ |
1509 |
struct frame *f; |
struct frame *f; |
1510 |
|
|
1511 |
CHECK_FRAME (frame, 0); |
CHECK_FRAME (frame); |
1512 |
CHECK_STRING (color, 0); |
CHECK_STRING (color); |
1513 |
f = XFRAME (frame); |
f = XFRAME (frame); |
1514 |
if (face_color_supported_p (f, XSTRING (color)->data, !NILP (background_p))) |
if (face_color_supported_p (f, XSTRING (color)->data, !NILP (background_p))) |
1515 |
return Qt; |
return Qt; |
2720 |
struct gcpro gcpro1; |
struct gcpro gcpro1; |
2721 |
|
|
2722 |
if (!NILP (family)) |
if (!NILP (family)) |
2723 |
CHECK_STRING (family, 1); |
CHECK_STRING (family); |
2724 |
|
|
2725 |
result = Qnil; |
result = Qnil; |
2726 |
GCPRO1 (result); |
GCPRO1 (result); |
2829 |
int maxnames; |
int maxnames; |
2830 |
|
|
2831 |
check_x (); |
check_x (); |
2832 |
CHECK_STRING (pattern, 0); |
CHECK_STRING (pattern); |
2833 |
|
|
2834 |
if (NILP (maximum)) |
if (NILP (maximum)) |
2835 |
maxnames = 2000; |
maxnames = 2000; |
2836 |
else |
else |
2837 |
{ |
{ |
2838 |
CHECK_NATNUM (maximum, 0); |
CHECK_NATNUM (maximum); |
2839 |
maxnames = XINT (maximum); |
maxnames = XINT (maximum); |
2840 |
} |
} |
2841 |
|
|
2842 |
if (!NILP (width)) |
if (!NILP (width)) |
2843 |
CHECK_NUMBER (width, 4); |
CHECK_NUMBER (width); |
2844 |
|
|
2845 |
/* We can't simply call check_x_frame because this function may be |
/* We can't simply call check_x_frame because this function may be |
2846 |
called before any frame is created. */ |
called before any frame is created. */ |
3626 |
struct frame *f; |
struct frame *f; |
3627 |
int i; |
int i; |
3628 |
|
|
3629 |
CHECK_SYMBOL (face, 0); |
CHECK_SYMBOL (face); |
3630 |
global_lface = lface_from_face_name (NULL, face, 0); |
global_lface = lface_from_face_name (NULL, face, 0); |
3631 |
|
|
3632 |
if (!NILP (frame)) |
if (!NILP (frame)) |
3633 |
{ |
{ |
3634 |
CHECK_LIVE_FRAME (frame, 1); |
CHECK_LIVE_FRAME (frame); |
3635 |
f = XFRAME (frame); |
f = XFRAME (frame); |
3636 |
lface = lface_from_face_name (f, face, 0); |
lface = lface_from_face_name (f, face, 0); |
3637 |
} |
} |
3703 |
|
|
3704 |
if (!NILP (frame)) |
if (!NILP (frame)) |
3705 |
{ |
{ |
3706 |
CHECK_LIVE_FRAME (frame, 1); |
CHECK_LIVE_FRAME (frame); |
3707 |
lface = lface_from_face_name (XFRAME (frame), face, 0); |
lface = lface_from_face_name (XFRAME (frame), face, 0); |
3708 |
} |
} |
3709 |
else |
else |
3727 |
{ |
{ |
3728 |
Lisp_Object lface, copy; |
Lisp_Object lface, copy; |
3729 |
|
|
3730 |
CHECK_SYMBOL (from, 0); |
CHECK_SYMBOL (from); |
3731 |
CHECK_SYMBOL (to, 1); |
CHECK_SYMBOL (to); |
3732 |
if (NILP (new_frame)) |
if (NILP (new_frame)) |
3733 |
new_frame = frame; |
new_frame = frame; |
3734 |
|
|
3742 |
else |
else |
3743 |
{ |
{ |
3744 |
/* Copy frame-local definition of FROM. */ |
/* Copy frame-local definition of FROM. */ |
3745 |
CHECK_LIVE_FRAME (frame, 2); |
CHECK_LIVE_FRAME (frame); |
3746 |
CHECK_LIVE_FRAME (new_frame, 3); |
CHECK_LIVE_FRAME (new_frame); |
3747 |
lface = lface_from_face_name (XFRAME (frame), from, 1); |
lface = lface_from_face_name (XFRAME (frame), from, 1); |
3748 |
copy = Finternal_make_lisp_face (to, new_frame); |
copy = Finternal_make_lisp_face (to, new_frame); |
3749 |
} |
} |
3773 |
/* Set 1 if ATTR is one of font-related attributes other than QCfont. */ |
/* Set 1 if ATTR is one of font-related attributes other than QCfont. */ |
3774 |
int font_related_attr_p = 0; |
int font_related_attr_p = 0; |
3775 |
|
|
3776 |
CHECK_SYMBOL (face, 0); |
CHECK_SYMBOL (face); |
3777 |
CHECK_SYMBOL (attr, 1); |
CHECK_SYMBOL (attr); |
3778 |
|
|
3779 |
face = resolve_face_name (face); |
face = resolve_face_name (face); |
3780 |
|
|
3797 |
if (NILP (frame)) |
if (NILP (frame)) |
3798 |
frame = selected_frame; |
frame = selected_frame; |
3799 |
|
|
3800 |
CHECK_LIVE_FRAME (frame, 3); |
CHECK_LIVE_FRAME (frame); |
3801 |
lface = lface_from_face_name (XFRAME (frame), face, 0); |
lface = lface_from_face_name (XFRAME (frame), face, 0); |
3802 |
|
|
3803 |
/* If a frame-local face doesn't exist yet, create one. */ |
/* If a frame-local face doesn't exist yet, create one. */ |
3809 |
{ |
{ |
3810 |
if (!UNSPECIFIEDP (value)) |
if (!UNSPECIFIEDP (value)) |
3811 |
{ |
{ |
3812 |
CHECK_STRING (value, 3); |
CHECK_STRING (value); |
3813 |
if (XSTRING (value)->size == 0) |
if (XSTRING (value)->size == 0) |
3814 |
signal_error ("Invalid face family", value); |
signal_error ("Invalid face family", value); |
3815 |
} |
} |
3842 |
{ |
{ |
3843 |
if (!UNSPECIFIEDP (value)) |
if (!UNSPECIFIEDP (value)) |
3844 |
{ |
{ |
3845 |
CHECK_SYMBOL (value, 3); |
CHECK_SYMBOL (value); |
3846 |
if (face_numeric_weight (value) < 0) |
if (face_numeric_weight (value) < 0) |
3847 |
signal_error ("Invalid face weight", value); |
signal_error ("Invalid face weight", value); |
3848 |
} |
} |
3854 |
{ |
{ |
3855 |
if (!UNSPECIFIEDP (value)) |
if (!UNSPECIFIEDP (value)) |
3856 |
{ |
{ |
3857 |
CHECK_SYMBOL (value, 3); |
CHECK_SYMBOL (value); |
3858 |
if (face_numeric_slant (value) < 0) |
if (face_numeric_slant (value) < 0) |
3859 |
signal_error ("Invalid face slant", value); |
signal_error ("Invalid face slant", value); |
3860 |
} |
} |
3972 |
{ |
{ |
3973 |
if (!UNSPECIFIEDP (value)) |
if (!UNSPECIFIEDP (value)) |
3974 |
{ |
{ |
3975 |
CHECK_SYMBOL (value, 3); |
CHECK_SYMBOL (value); |
3976 |
if (!EQ (value, Qt) && !NILP (value)) |
if (!EQ (value, Qt) && !NILP (value)) |
3977 |
signal_error ("Invalid inverse-video face attribute value", value); |
signal_error ("Invalid inverse-video face attribute value", value); |
3978 |
} |
} |
3986 |
/* Don't check for valid color names here because it depends |
/* Don't check for valid color names here because it depends |
3987 |
on the frame (display) whether the color will be valid |
on the frame (display) whether the color will be valid |
3988 |
when the face is realized. */ |
when the face is realized. */ |
3989 |
CHECK_STRING (value, 3); |
CHECK_STRING (value); |
3990 |
if (XSTRING (value)->size == 0) |
if (XSTRING (value)->size == 0) |
3991 |
signal_error ("Empty foreground color value", value); |
signal_error ("Empty foreground color value", value); |
3992 |
} |
} |
4000 |
/* Don't check for valid color names here because it depends |
/* Don't check for valid color names here because it depends |
4001 |
on the frame (display) whether the color will be valid |
on the frame (display) whether the color will be valid |
4002 |
when the face is realized. */ |
when the face is realized. */ |
4003 |
CHECK_STRING (value, 3); |
CHECK_STRING (value); |
4004 |
if (XSTRING (value)->size == 0) |
if (XSTRING (value)->size == 0) |
4005 |
signal_error ("Empty background color value", value); |
signal_error ("Empty background color value", value); |
4006 |
} |
} |
4022 |
{ |
{ |
4023 |
if (!UNSPECIFIEDP (value)) |
if (!UNSPECIFIEDP (value)) |
4024 |
{ |
{ |
4025 |
CHECK_SYMBOL (value, 3); |
CHECK_SYMBOL (value); |
4026 |
if (face_numeric_swidth (value) < 0) |
if (face_numeric_swidth (value) < 0) |
4027 |
signal_error ("Invalid face width", value); |
signal_error ("Invalid face width", value); |
4028 |
} |
} |
4040 |
struct frame *f; |
struct frame *f; |
4041 |
Lisp_Object tmp; |
Lisp_Object tmp; |
4042 |
|
|
4043 |
CHECK_STRING (value, 3); |
CHECK_STRING (value); |
4044 |
if (EQ (frame, Qt)) |
if (EQ (frame, Qt)) |
4045 |
f = SELECTED_FRAME (); |
f = SELECTED_FRAME (); |
4046 |
else |
else |
4314 |
Lisp_Object value = Qnil; |
Lisp_Object value = Qnil; |
4315 |
#ifndef WINDOWSNT |
#ifndef WINDOWSNT |
4316 |
#ifndef macintosh |
#ifndef macintosh |
4317 |
CHECK_STRING (resource, 0); |
CHECK_STRING (resource); |
4318 |
CHECK_STRING (class, 1); |
CHECK_STRING (class); |
4319 |
CHECK_LIVE_FRAME (frame, 2); |
CHECK_LIVE_FRAME (frame); |
4320 |
BLOCK_INPUT; |
BLOCK_INPUT; |
4321 |
value = display_x_get_resource (FRAME_X_DISPLAY_INFO (XFRAME (frame)), |
value = display_x_get_resource (FRAME_X_DISPLAY_INFO (XFRAME (frame)), |
4322 |
resource, class, Qnil, Qnil); |
resource, class, Qnil, Qnil); |
4363 |
(face, attr, value, frame) |
(face, attr, value, frame) |
4364 |
Lisp_Object face, attr, value, frame; |
Lisp_Object face, attr, value, frame; |
4365 |
{ |
{ |
4366 |
CHECK_SYMBOL (face, 0); |
CHECK_SYMBOL (face); |
4367 |
CHECK_SYMBOL (attr, 1); |
CHECK_SYMBOL (attr); |
4368 |
CHECK_STRING (value, 2); |
CHECK_STRING (value); |
4369 |
|
|
4370 |
if (xstricmp (XSTRING (value)->data, "unspecified") == 0) |
if (xstricmp (XSTRING (value)->data, "unspecified") == 0) |
4371 |
value = Qunspecified; |
value = Qunspecified; |
4532 |
{ |
{ |
4533 |
Lisp_Object lface, value = Qnil; |
Lisp_Object lface, value = Qnil; |
4534 |
|
|
4535 |
CHECK_SYMBOL (symbol, 0); |
CHECK_SYMBOL (symbol); |
4536 |
CHECK_SYMBOL (keyword, 1); |
CHECK_SYMBOL (keyword); |
4537 |
|
|
4538 |
if (EQ (frame, Qt)) |
if (EQ (frame, Qt)) |
4539 |
lface = lface_from_face_name (NULL, symbol, 1); |
lface = lface_from_face_name (NULL, symbol, 1); |
4541 |
{ |
{ |
4542 |
if (NILP (frame)) |
if (NILP (frame)) |
4543 |
frame = selected_frame; |
frame = selected_frame; |
4544 |
CHECK_LIVE_FRAME (frame, 2); |
CHECK_LIVE_FRAME (frame); |
4545 |
lface = lface_from_face_name (XFRAME (frame), symbol, 1); |
lface = lface_from_face_name (XFRAME (frame), symbol, 1); |
4546 |
} |
} |
4547 |
|
|
4593 |
{ |
{ |
4594 |
Lisp_Object result = Qnil; |
Lisp_Object result = Qnil; |
4595 |
|
|
4596 |
CHECK_SYMBOL (attr, 0); |
CHECK_SYMBOL (attr); |
4597 |
|
|
4598 |
if (EQ (attr, QCweight) |
if (EQ (attr, QCweight) |
4599 |
|| EQ (attr, QCslant) |
|| EQ (attr, QCslant) |
4646 |
int i; |
int i; |
4647 |
Lisp_Object global_lface, local_lface, *gvec, *lvec; |
Lisp_Object global_lface, local_lface, *gvec, *lvec; |
4648 |
|
|
4649 |
CHECK_LIVE_FRAME (frame, 1); |
CHECK_LIVE_FRAME (frame); |
4650 |
global_lface = lface_from_face_name (NULL, face, 1); |
global_lface = lface_from_face_name (NULL, face, 1); |
4651 |
local_lface = lface_from_face_name (XFRAME (frame), face, 0); |
local_lface = lface_from_face_name (XFRAME (frame), face, 0); |
4652 |
if (NILP (local_lface)) |
if (NILP (local_lface)) |
4800 |
|
|
4801 |
if (NILP (frame)) |
if (NILP (frame)) |
4802 |
frame = selected_frame; |
frame = selected_frame; |
4803 |
CHECK_LIVE_FRAME (frame, 0); |
CHECK_LIVE_FRAME (frame); |
4804 |
f = XFRAME (frame); |
f = XFRAME (frame); |
4805 |
|
|
4806 |
if (EQ (frame, Qt)) |
if (EQ (frame, Qt)) |
5526 |
int i; |
int i; |
5527 |
int indices[DIM (font_sort_order)]; |
int indices[DIM (font_sort_order)]; |
5528 |
|
|
5529 |
CHECK_LIST (order, 0); |
CHECK_LIST (order); |
5530 |
bzero (indices, sizeof indices); |
bzero (indices, sizeof indices); |
5531 |
i = 0; |
i = 0; |
5532 |
|
|
5579 |
(alist) |
(alist) |
5580 |
Lisp_Object alist; |
Lisp_Object alist; |
5581 |
{ |
{ |
5582 |
CHECK_LIST (alist, 0); |
CHECK_LIST (alist); |
5583 |
Vface_alternative_font_family_alist = alist; |
Vface_alternative_font_family_alist = alist; |
5584 |
free_all_realized_faces (Qnil); |
free_all_realized_faces (Qnil); |
5585 |
return alist; |
return alist; |
5596 |
(alist) |
(alist) |
5597 |
Lisp_Object alist; |
Lisp_Object alist; |
5598 |
{ |
{ |
5599 |
CHECK_LIST (alist, 0); |
CHECK_LIST (alist); |
5600 |
Vface_alternative_font_registry_alist = alist; |
Vface_alternative_font_registry_alist = alist; |
5601 |
free_all_realized_faces (Qnil); |
free_all_realized_faces (Qnil); |
5602 |
return alist; |
return alist; |
7039 |
else |
else |
7040 |
{ |
{ |
7041 |
struct face *face; |
struct face *face; |
7042 |
CHECK_NUMBER (n, 0); |
CHECK_NUMBER (n); |
7043 |
face = FACE_FROM_ID (SELECTED_FRAME (), XINT (n)); |
face = FACE_FROM_ID (SELECTED_FRAME (), XINT (n)); |
7044 |
if (face == NULL) |
if (face == NULL) |
7045 |
error ("Not a valid face"); |
error ("Not a valid face"); |