comparison src/xfaces.c @ 39988:eac4e9ae201c

Change doc-string comments to `new style' [w/`doc:' keyword].
author Miles Bader <miles@gnu.org>
date Wed, 17 Oct 2001 03:16:12 +0000
parents 579177964efa
children 3914e6d2452f
comparison
equal deleted inserted replaced
39987:9c096889e4c6 39988:eac4e9ae201c
192 used to fill in unspecified attributes of the default face. */ 192 used to fill in unspecified attributes of the default face. */
193 193
194 #include <config.h> 194 #include <config.h>
195 #include <sys/types.h> 195 #include <sys/types.h>
196 #include <sys/stat.h> 196 #include <sys/stat.h>
197 #define DOC_STRINGS_IN_COMMENTS 197
198 #include "lisp.h" 198 #include "lisp.h"
199 #include "charset.h" 199 #include "charset.h"
200 #include "keyboard.h" 200 #include "keyboard.h"
201 #include "frame.h" 201 #include "frame.h"
202 202
667 unregister_color (pixels[i]); 667 unregister_color (pixels[i]);
668 } 668 }
669 669
670 670
671 DEFUN ("dump-colors", Fdump_colors, Sdump_colors, 0, 0, 0, 671 DEFUN ("dump-colors", Fdump_colors, Sdump_colors, 0, 0, 0,
672 /* Dump currently allocated colors to stderr. */ 672 doc: /* Dump currently allocated colors to stderr. */)
673 ()) 673 ()
674 { 674 {
675 int i, n; 675 int i, n;
676 676
677 fputc ('\n', stderr); 677 fputc ('\n', stderr);
678 678
1015 #endif /* HAVE_WINDOW_SYSTEM */ 1015 #endif /* HAVE_WINDOW_SYSTEM */
1016 } 1016 }
1017 1017
1018 1018
1019 DEFUN ("clear-face-cache", Fclear_face_cache, Sclear_face_cache, 0, 1, 0, 1019 DEFUN ("clear-face-cache", Fclear_face_cache, Sclear_face_cache, 0, 1, 0,
1020 /* Clear face caches on all frames. 1020 doc: /* Clear face caches on all frames.
1021 Optional THOROUGHLY non-nil means try to free unused fonts, too. */ 1021 Optional THOROUGHLY non-nil means try to free unused fonts, too. */)
1022 (thoroughly)) 1022 (thoroughly)
1023 Lisp_Object thoroughly; 1023 Lisp_Object thoroughly;
1024 { 1024 {
1025 clear_face_cache (!NILP (thoroughly)); 1025 clear_face_cache (!NILP (thoroughly));
1026 ++face_change_count; 1026 ++face_change_count;
1027 ++windows_or_buffers_changed; 1027 ++windows_or_buffers_changed;
1096 ***********************************************************************/ 1096 ***********************************************************************/
1097 1097
1098 #ifdef HAVE_WINDOW_SYSTEM 1098 #ifdef HAVE_WINDOW_SYSTEM
1099 1099
1100 DEFUN ("bitmap-spec-p", Fbitmap_spec_p, Sbitmap_spec_p, 1, 1, 0, 1100 DEFUN ("bitmap-spec-p", Fbitmap_spec_p, Sbitmap_spec_p, 1, 1, 0,
1101 /* Value is non-nil if OBJECT is a valid bitmap specification. 1101 doc: /* Value is non-nil if OBJECT is a valid bitmap specification.
1102 A bitmap specification is either a string, a file name, or a list 1102 A bitmap specification is either a string, a file name, or a list
1103 \(WIDTH HEIGHT DATA) where WIDTH is the pixel width of the bitmap, 1103 \(WIDTH HEIGHT DATA) where WIDTH is the pixel width of the bitmap,
1104 HEIGHT is its height, and DATA is a string containing the bits of 1104 HEIGHT is its height, and DATA is a string containing the bits of
1105 the pixmap. Bits are stored row by row, each row occupies 1105 the pixmap. Bits are stored row by row, each row occupies
1106 \(WIDTH + 7)/8 bytes. */ 1106 \(WIDTH + 7)/8 bytes. */)
1107 (object)) 1107 (object)
1108 Lisp_Object object; 1108 Lisp_Object object;
1109 { 1109 {
1110 int pixmap_p = 0; 1110 int pixmap_p = 0;
1111 1111
1112 if (STRINGP (object)) 1112 if (STRINGP (object))
1480 : tty_defined_color (f, color_name, &not_used, 0)); 1480 : tty_defined_color (f, color_name, &not_used, 0));
1481 } 1481 }
1482 1482
1483 1483
1484 DEFUN ("color-gray-p", Fcolor_gray_p, Scolor_gray_p, 1, 2, 0, 1484 DEFUN ("color-gray-p", Fcolor_gray_p, Scolor_gray_p, 1, 2, 0,
1485 /* Return non-nil if COLOR is a shade of gray (or white or black). 1485 doc: /* Return non-nil if COLOR is a shade of gray (or white or black).
1486 FRAME specifies the frame and thus the display for interpreting COLOR. 1486 FRAME specifies the frame and thus the display for interpreting COLOR.
1487 If FRAME is nil or omitted, use the selected frame. */ 1487 If FRAME is nil or omitted, use the selected frame. */)
1488 (color, frame)) 1488 (color, frame)
1489 Lisp_Object color, frame; 1489 Lisp_Object color, frame;
1490 { 1490 {
1491 struct frame *f; 1491 struct frame *f;
1492 1492
1493 CHECK_FRAME (frame, 0); 1493 CHECK_FRAME (frame, 0);
1497 } 1497 }
1498 1498
1499 1499
1500 DEFUN ("color-supported-p", Fcolor_supported_p, 1500 DEFUN ("color-supported-p", Fcolor_supported_p,
1501 Scolor_supported_p, 2, 3, 0, 1501 Scolor_supported_p, 2, 3, 0,
1502 /* Return non-nil if COLOR can be displayed on FRAME. 1502 doc: /* Return non-nil if COLOR can be displayed on FRAME.
1503 BACKGROUND-P non-nil means COLOR is used as a background. 1503 BACKGROUND-P non-nil means COLOR is used as a background.
1504 If FRAME is nil or omitted, use the selected frame. 1504 If FRAME is nil or omitted, use the selected frame.
1505 COLOR must be a valid color name. */ 1505 COLOR must be a valid color name. */)
1506 (color, frame, background_p)) 1506 (color, frame, background_p)
1507 Lisp_Object frame, color, background_p; 1507 Lisp_Object frame, color, background_p;
1508 { 1508 {
1509 struct frame *f; 1509 struct frame *f;
1510 1510
1511 CHECK_FRAME (frame, 0); 1511 CHECK_FRAME (frame, 0);
2690 } 2690 }
2691 } 2691 }
2692 2692
2693 2693
2694 DEFUN ("x-family-fonts", Fx_family_fonts, Sx_family_fonts, 0, 2, 0, 2694 DEFUN ("x-family-fonts", Fx_family_fonts, Sx_family_fonts, 0, 2, 0,
2695 /* Return a list of available fonts of family FAMILY on FRAME. 2695 doc: /* Return a list of available fonts of family FAMILY on FRAME.
2696 If FAMILY is omitted or nil, list all families. 2696 If FAMILY is omitted or nil, list all families.
2697 Otherwise, FAMILY must be a string, possibly containing wildcards 2697 Otherwise, FAMILY must be a string, possibly containing wildcards
2698 `?' and `*'. 2698 `?' and `*'.
2699 If FRAME is omitted or nil, use the selected frame. 2699 If FRAME is omitted or nil, use the selected frame.
2700 Each element of the result is a vector [FAMILY WIDTH POINT-SIZE WEIGHT 2700 Each element of the result is a vector [FAMILY WIDTH POINT-SIZE WEIGHT
2704 width, weight and slant of the font. These symbols are the same as for 2704 width, weight and slant of the font. These symbols are the same as for
2705 face attributes. FIXED-P is non-nil if the font is fixed-pitch. 2705 face attributes. FIXED-P is non-nil if the font is fixed-pitch.
2706 FULL is the full name of the font, and REGISTRY-AND-ENCODING is a string 2706 FULL is the full name of the font, and REGISTRY-AND-ENCODING is a string
2707 giving the registry and encoding of the font. 2707 giving the registry and encoding of the font.
2708 The result list is sorted according to the current setting of 2708 The result list is sorted according to the current setting of
2709 the face font sort order. */ 2709 the face font sort order. */)
2710 (family, frame)) 2710 (family, frame)
2711 Lisp_Object family, frame; 2711 Lisp_Object family, frame;
2712 { 2712 {
2713 struct frame *f = check_x_frame (frame); 2713 struct frame *f = check_x_frame (frame);
2714 struct font_name *fonts; 2714 struct font_name *fonts;
2715 int i, nfonts; 2715 int i, nfonts;
2750 } 2750 }
2751 2751
2752 2752
2753 DEFUN ("x-font-family-list", Fx_font_family_list, Sx_font_family_list, 2753 DEFUN ("x-font-family-list", Fx_font_family_list, Sx_font_family_list,
2754 0, 1, 0, 2754 0, 1, 0,
2755 /* Return a list of available font families on FRAME. 2755 doc: /* Return a list of available font families on FRAME.
2756 If FRAME is omitted or nil, use the selected frame. 2756 If FRAME is omitted or nil, use the selected frame.
2757 Value is a list of conses (FAMILY . FIXED-P) where FAMILY 2757 Value is a list of conses (FAMILY . FIXED-P) where FAMILY
2758 is a font family, and FIXED-P is non-nil if fonts of that family 2758 is a font family, and FIXED-P is non-nil if fonts of that family
2759 are fixed-pitch. */ 2759 are fixed-pitch. */)
2760 (frame)) 2760 (frame)
2761 Lisp_Object frame; 2761 Lisp_Object frame;
2762 { 2762 {
2763 struct frame *f = check_x_frame (frame); 2763 struct frame *f = check_x_frame (frame);
2764 int nfonts, i; 2764 int nfonts, i;
2765 struct font_name *fonts; 2765 struct font_name *fonts;
2797 return unbind_to (count, result); 2797 return unbind_to (count, result);
2798 } 2798 }
2799 2799
2800 2800
2801 DEFUN ("x-list-fonts", Fx_list_fonts, Sx_list_fonts, 1, 5, 0, 2801 DEFUN ("x-list-fonts", Fx_list_fonts, Sx_list_fonts, 1, 5, 0,
2802 /* Return a list of the names of available fonts matching PATTERN. 2802 doc: /* Return a list of the names of available fonts matching PATTERN.
2803 If optional arguments FACE and FRAME are specified, return only fonts 2803 If optional arguments FACE and FRAME are specified, return only fonts
2804 the same size as FACE on FRAME. 2804 the same size as FACE on FRAME.
2805 PATTERN is a string, perhaps with wildcard characters; 2805 PATTERN is a string, perhaps with wildcard characters;
2806 the * character matches any substring, and 2806 the * character matches any substring, and
2807 the ? character matches any single character. 2807 the ? character matches any single character.
2815 even if they match PATTERN and FACE. 2815 even if they match PATTERN and FACE.
2816 The optional fourth argument MAXIMUM sets a limit on how many 2816 The optional fourth argument MAXIMUM sets a limit on how many
2817 fonts to match. The first MAXIMUM fonts are reported. 2817 fonts to match. The first MAXIMUM fonts are reported.
2818 The optional fifth argument WIDTH, if specified, is a number of columns 2818 The optional fifth argument WIDTH, if specified, is a number of columns
2819 occupied by a character of a font. In that case, return only fonts 2819 occupied by a character of a font. In that case, return only fonts
2820 the WIDTH times as wide as FACE on FRAME. */ 2820 the WIDTH times as wide as FACE on FRAME. */)
2821 (pattern, face, frame, maximum, width)) 2821 (pattern, face, frame, maximum, width)
2822 Lisp_Object pattern, face, frame, maximum, width; 2822 Lisp_Object pattern, face, frame, maximum, width;
2823 { 2823 {
2824 struct frame *f; 2824 struct frame *f;
2825 int size; 2825 int size;
2826 int maxnames; 2826 int maxnames;
3622 } 3622 }
3623 3623
3624 3624
3625 DEFUN ("internal-make-lisp-face", Finternal_make_lisp_face, 3625 DEFUN ("internal-make-lisp-face", Finternal_make_lisp_face,
3626 Sinternal_make_lisp_face, 1, 2, 0, 3626 Sinternal_make_lisp_face, 1, 2, 0,
3627 /* Make FACE, a symbol, a Lisp face with all attributes nil. 3627 doc: /* Make FACE, a symbol, a Lisp face with all attributes nil.
3628 If FACE was not known as a face before, create a new one. 3628 If FACE was not known as a face before, create a new one.
3629 If optional argument FRAME is specified, make a frame-local face 3629 If optional argument FRAME is specified, make a frame-local face
3630 for that frame. Otherwise operate on the global face definition. 3630 for that frame. Otherwise operate on the global face definition.
3631 Value is a vector of face attributes. */ 3631 Value is a vector of face attributes. */)
3632 (face, frame)) 3632 (face, frame)
3633 Lisp_Object face, frame; 3633 Lisp_Object face, frame;
3634 { 3634 {
3635 Lisp_Object global_lface, lface; 3635 Lisp_Object global_lface, lface;
3636 struct frame *f; 3636 struct frame *f;
3637 int i; 3637 int i;
3700 } 3700 }
3701 3701
3702 3702
3703 DEFUN ("internal-lisp-face-p", Finternal_lisp_face_p, 3703 DEFUN ("internal-lisp-face-p", Finternal_lisp_face_p,
3704 Sinternal_lisp_face_p, 1, 2, 0, 3704 Sinternal_lisp_face_p, 1, 2, 0,
3705 /* Return non-nil if FACE names a face. 3705 doc: /* Return non-nil if FACE names a face.
3706 If optional second parameter FRAME is non-nil, check for the 3706 If optional second parameter FRAME is non-nil, check for the
3707 existence of a frame-local face with name FACE on that frame. 3707 existence of a frame-local face with name FACE on that frame.
3708 Otherwise check for the existence of a global face. */ 3708 Otherwise check for the existence of a global face. */)
3709 (face, frame)) 3709 (face, frame)
3710 Lisp_Object face, frame; 3710 Lisp_Object face, frame;
3711 { 3711 {
3712 Lisp_Object lface; 3712 Lisp_Object lface;
3713 3713
3714 if (!NILP (frame)) 3714 if (!NILP (frame))
3723 } 3723 }
3724 3724
3725 3725
3726 DEFUN ("internal-copy-lisp-face", Finternal_copy_lisp_face, 3726 DEFUN ("internal-copy-lisp-face", Finternal_copy_lisp_face,
3727 Sinternal_copy_lisp_face, 4, 4, 0, 3727 Sinternal_copy_lisp_face, 4, 4, 0,
3728 /* Copy face FROM to TO. 3728 doc: /* Copy face FROM to TO.
3729 If FRAME it t, copy the global face definition of FROM to the 3729 If FRAME it t, copy the global face definition of FROM to the
3730 global face definition of TO. Otherwise, copy the frame-local 3730 global face definition of TO. Otherwise, copy the frame-local
3731 definition of FROM on FRAME to the frame-local definition of TO 3731 definition of FROM on FRAME to the frame-local definition of TO
3732 on NEW-FRAME, or FRAME if NEW-FRAME is nil. 3732 on NEW-FRAME, or FRAME if NEW-FRAME is nil.
3733 3733
3734 Value is TO. */ 3734 Value is TO. */)
3735 (from, to, frame, new_frame)) 3735 (from, to, frame, new_frame)
3736 Lisp_Object from, to, frame, new_frame; 3736 Lisp_Object from, to, frame, new_frame;
3737 { 3737 {
3738 Lisp_Object lface, copy; 3738 Lisp_Object lface, copy;
3739 3739
3740 CHECK_SYMBOL (from, 0); 3740 CHECK_SYMBOL (from, 0);
3765 } 3765 }
3766 3766
3767 3767
3768 DEFUN ("internal-set-lisp-face-attribute", Finternal_set_lisp_face_attribute, 3768 DEFUN ("internal-set-lisp-face-attribute", Finternal_set_lisp_face_attribute,
3769 Sinternal_set_lisp_face_attribute, 3, 4, 0, 3769 Sinternal_set_lisp_face_attribute, 3, 4, 0,
3770 /* Set attribute ATTR of FACE to VALUE. 3770 doc: /* Set attribute ATTR of FACE to VALUE.
3771 FRAME being a frame means change the face on that frame. 3771 FRAME being a frame means change the face on that frame.
3772 FRAME nil means change the face of the selected frame. 3772 FRAME nil means change the face of the selected frame.
3773 FRAME t means change the default for new frames. 3773 FRAME t means change the default for new frames.
3774 FRAME 0 means change the face on all frames, and change the default 3774 FRAME 0 means change the face on all frames, and change the default
3775 for new frames. */ 3775 for new frames. */)
3776 (face, attr, value, frame)) 3776 (face, attr, value, frame)
3777 Lisp_Object face, attr, value, frame; 3777 Lisp_Object face, attr, value, frame;
3778 { 3778 {
3779 Lisp_Object lface; 3779 Lisp_Object lface;
3780 Lisp_Object old_value = Qnil; 3780 Lisp_Object old_value = Qnil;
3781 /* Set 1 if ATTR is QCfont. */ 3781 /* Set 1 if ATTR is QCfont. */
4309 /* Get the value of X resource RESOURCE, class CLASS for the display 4309 /* Get the value of X resource RESOURCE, class CLASS for the display
4310 of frame FRAME. This is here because ordinary `x-get-resource' 4310 of frame FRAME. This is here because ordinary `x-get-resource'
4311 doesn't take a frame argument. */ 4311 doesn't take a frame argument. */
4312 4312
4313 DEFUN ("internal-face-x-get-resource", Finternal_face_x_get_resource, 4313 DEFUN ("internal-face-x-get-resource", Finternal_face_x_get_resource,
4314 Sinternal_face_x_get_resource, 3, 3, 0, 4314 Sinternal_face_x_get_resource, 3, 3, 0, doc: /* */)
4315 /* */ 4315 (resource, class, frame)
4316 (resource, class, frame))
4317 Lisp_Object resource, class, frame; 4316 Lisp_Object resource, class, frame;
4318 { 4317 {
4319 Lisp_Object value = Qnil; 4318 Lisp_Object value = Qnil;
4320 #ifndef WINDOWSNT 4319 #ifndef WINDOWSNT
4321 #ifndef macintosh 4320 #ifndef macintosh
4362 4361
4363 4362
4364 DEFUN ("internal-set-lisp-face-attribute-from-resource", 4363 DEFUN ("internal-set-lisp-face-attribute-from-resource",
4365 Finternal_set_lisp_face_attribute_from_resource, 4364 Finternal_set_lisp_face_attribute_from_resource,
4366 Sinternal_set_lisp_face_attribute_from_resource, 4365 Sinternal_set_lisp_face_attribute_from_resource,
4367 3, 4, 0, 4366 3, 4, 0, doc: /* */)
4368 /* */ 4367 (face, attr, value, frame)
4369 (face, attr, value, frame))
4370 Lisp_Object face, attr, value, frame; 4368 Lisp_Object face, attr, value, frame;
4371 { 4369 {
4372 CHECK_SYMBOL (face, 0); 4370 CHECK_SYMBOL (face, 0);
4373 CHECK_SYMBOL (attr, 1); 4371 CHECK_SYMBOL (attr, 1);
4374 CHECK_STRING (value, 2); 4372 CHECK_STRING (value, 2);
4493 4491
4494 4492
4495 DEFUN ("internal-get-lisp-face-attribute", Finternal_get_lisp_face_attribute, 4493 DEFUN ("internal-get-lisp-face-attribute", Finternal_get_lisp_face_attribute,
4496 Sinternal_get_lisp_face_attribute, 4494 Sinternal_get_lisp_face_attribute,
4497 2, 3, 0, 4495 2, 3, 0,
4498 /* Return face attribute KEYWORD of face SYMBOL. 4496 doc: /* Return face attribute KEYWORD of face SYMBOL.
4499 If SYMBOL does not name a valid Lisp face or KEYWORD isn't a valid 4497 If SYMBOL does not name a valid Lisp face or KEYWORD isn't a valid
4500 face attribute name, signal an error. 4498 face attribute name, signal an error.
4501 If the optional argument FRAME is given, report on face FACE in that 4499 If the optional argument FRAME is given, report on face FACE in that
4502 frame. If FRAME is t, report on the defaults for face FACE (for new 4500 frame. If FRAME is t, report on the defaults for face FACE (for new
4503 frames). If FRAME is omitted or nil, use the selected frame. */ 4501 frames). If FRAME is omitted or nil, use the selected frame. */)
4504 (symbol, keyword, frame)) 4502 (symbol, keyword, frame)
4505 Lisp_Object symbol, keyword, frame; 4503 Lisp_Object symbol, keyword, frame;
4506 { 4504 {
4507 Lisp_Object lface, value = Qnil; 4505 Lisp_Object lface, value = Qnil;
4508 4506
4509 CHECK_SYMBOL (symbol, 0); 4507 CHECK_SYMBOL (symbol, 0);
4558 4556
4559 4557
4560 DEFUN ("internal-lisp-face-attribute-values", 4558 DEFUN ("internal-lisp-face-attribute-values",
4561 Finternal_lisp_face_attribute_values, 4559 Finternal_lisp_face_attribute_values,
4562 Sinternal_lisp_face_attribute_values, 1, 1, 0, 4560 Sinternal_lisp_face_attribute_values, 1, 1, 0,
4563 /* Return a list of valid discrete values for face attribute ATTR. 4561 doc: /* Return a list of valid discrete values for face attribute ATTR.
4564 Value is nil if ATTR doesn't have a discrete set of valid values. */ 4562 Value is nil if ATTR doesn't have a discrete set of valid values. */)
4565 (attr)) 4563 (attr)
4566 Lisp_Object attr; 4564 Lisp_Object attr;
4567 { 4565 {
4568 Lisp_Object result = Qnil; 4566 Lisp_Object result = Qnil;
4569 4567
4570 CHECK_SYMBOL (attr, 0); 4568 CHECK_SYMBOL (attr, 0);
4610 } 4608 }
4611 4609
4612 4610
4613 DEFUN ("internal-merge-in-global-face", Finternal_merge_in_global_face, 4611 DEFUN ("internal-merge-in-global-face", Finternal_merge_in_global_face,
4614 Sinternal_merge_in_global_face, 2, 2, 0, 4612 Sinternal_merge_in_global_face, 2, 2, 0,
4615 /* Add attributes from frame-default definition of FACE to FACE on FRAME. 4613 doc: /* Add attributes from frame-default definition of FACE to FACE on FRAME.
4616 Default face attributes override any local face attributes. */ 4614 Default face attributes override any local face attributes. */)
4617 (face, frame)) 4615 (face, frame)
4618 Lisp_Object face, frame; 4616 Lisp_Object face, frame;
4619 { 4617 {
4620 int i; 4618 int i;
4621 Lisp_Object global_lface, local_lface, *gvec, *lvec; 4619 Lisp_Object global_lface, local_lface, *gvec, *lvec;
4622 4620
4645 The function is used in x-resolve-fonts when it is asked to 4643 The function is used in x-resolve-fonts when it is asked to
4646 return fonts with the same size as the font of a face. This is 4644 return fonts with the same size as the font of a face. This is
4647 done in fontset.el. */ 4645 done in fontset.el. */
4648 4646
4649 DEFUN ("face-font", Fface_font, Sface_font, 1, 2, 0, 4647 DEFUN ("face-font", Fface_font, Sface_font, 1, 2, 0,
4650 /* Return the font name of face FACE, or nil if it is unspecified. 4648 doc: /* Return the font name of face FACE, or nil if it is unspecified.
4651 If the optional argument FRAME is given, report on face FACE in that frame. 4649 If the optional argument FRAME is given, report on face FACE in that frame.
4652 If FRAME is t, report on the defaults for face FACE (for new frames). 4650 If FRAME is t, report on the defaults for face FACE (for new frames).
4653 The font default for a face is either nil, or a list 4651 The font default for a face is either nil, or a list
4654 of the form (bold), (italic) or (bold italic). 4652 of the form (bold), (italic) or (bold italic).
4655 If FRAME is omitted or nil, use the selected frame. */ 4653 If FRAME is omitted or nil, use the selected frame. */)
4656 (face, frame)) 4654 (face, frame)
4657 Lisp_Object face, frame; 4655 Lisp_Object face, frame;
4658 { 4656 {
4659 if (EQ (frame, Qt)) 4657 if (EQ (frame, Qt))
4660 { 4658 {
4661 Lisp_Object result = Qnil; 4659 Lisp_Object result = Qnil;
4729 } 4727 }
4730 4728
4731 4729
4732 DEFUN ("internal-lisp-face-equal-p", Finternal_lisp_face_equal_p, 4730 DEFUN ("internal-lisp-face-equal-p", Finternal_lisp_face_equal_p,
4733 Sinternal_lisp_face_equal_p, 2, 3, 0, 4731 Sinternal_lisp_face_equal_p, 2, 3, 0,
4734 /* True if FACE1 and FACE2 are equal. 4732 doc: /* True if FACE1 and FACE2 are equal.
4735 If the optional argument FRAME is given, report on face FACE in that frame. 4733 If the optional argument FRAME is given, report on face FACE in that frame.
4736 If FRAME is t, report on the defaults for face FACE (for new frames). 4734 If FRAME is t, report on the defaults for face FACE (for new frames).
4737 If FRAME is omitted or nil, use the selected frame. */ 4735 If FRAME is omitted or nil, use the selected frame. */)
4738 (face1, face2, frame)) 4736 (face1, face2, frame)
4739 Lisp_Object face1, face2, frame; 4737 Lisp_Object face1, face2, frame;
4740 { 4738 {
4741 int equal_p; 4739 int equal_p;
4742 struct frame *f; 4740 struct frame *f;
4743 Lisp_Object lface1, lface2; 4741 Lisp_Object lface1, lface2;
4759 } 4757 }
4760 4758
4761 4759
4762 DEFUN ("internal-lisp-face-empty-p", Finternal_lisp_face_empty_p, 4760 DEFUN ("internal-lisp-face-empty-p", Finternal_lisp_face_empty_p,
4763 Sinternal_lisp_face_empty_p, 1, 2, 0, 4761 Sinternal_lisp_face_empty_p, 1, 2, 0,
4764 /* True if FACE has no attribute specified. 4762 doc: /* True if FACE has no attribute specified.
4765 If the optional argument FRAME is given, report on face FACE in that frame. 4763 If the optional argument FRAME is given, report on face FACE in that frame.
4766 If FRAME is t, report on the defaults for face FACE (for new frames). 4764 If FRAME is t, report on the defaults for face FACE (for new frames).
4767 If FRAME is omitted or nil, use the selected frame. */ 4765 If FRAME is omitted or nil, use the selected frame. */)
4768 (face, frame)) 4766 (face, frame)
4769 Lisp_Object face, frame; 4767 Lisp_Object face, frame;
4770 { 4768 {
4771 struct frame *f; 4769 struct frame *f;
4772 Lisp_Object lface; 4770 Lisp_Object lface;
4773 int i; 4771 int i;
4790 } 4788 }
4791 4789
4792 4790
4793 DEFUN ("frame-face-alist", Fframe_face_alist, Sframe_face_alist, 4791 DEFUN ("frame-face-alist", Fframe_face_alist, Sframe_face_alist,
4794 0, 1, 0, 4792 0, 1, 0,
4795 /* Return an alist of frame-local faces defined on FRAME. 4793 doc: /* Return an alist of frame-local faces defined on FRAME.
4796 For internal use only. */ 4794 For internal use only. */)
4797 (frame)) 4795 (frame)
4798 Lisp_Object frame; 4796 Lisp_Object frame;
4799 { 4797 {
4800 struct frame *f = frame_or_selected_frame (frame, 0); 4798 struct frame *f = frame_or_selected_frame (frame, 0);
4801 return f->face_alist; 4799 return f->face_alist;
4802 } 4800 }
5469 ***********************************************************************/ 5467 ***********************************************************************/
5470 5468
5471 DEFUN ("internal-set-font-selection-order", 5469 DEFUN ("internal-set-font-selection-order",
5472 Finternal_set_font_selection_order, 5470 Finternal_set_font_selection_order,
5473 Sinternal_set_font_selection_order, 1, 1, 0, 5471 Sinternal_set_font_selection_order, 1, 1, 0,
5474 /* Set font selection order for face font selection to ORDER. 5472 doc: /* Set font selection order for face font selection to ORDER.
5475 ORDER must be a list of length 4 containing the symbols `:width', 5473 ORDER must be a list of length 4 containing the symbols `:width',
5476 `:height', `:weight', and `:slant'. Face attributes appearing 5474 `:height', `:weight', and `:slant'. Face attributes appearing
5477 first in ORDER are matched first, e.g. if `:height' appears before 5475 first in ORDER are matched first, e.g. if `:height' appears before
5478 `:weight' in ORDER, font selection first tries to find a font with 5476 `:weight' in ORDER, font selection first tries to find a font with
5479 a suitable height, and then tries to match the font weight. 5477 a suitable height, and then tries to match the font weight.
5480 Value is ORDER. */ 5478 Value is ORDER. */)
5481 (order)) 5479 (order)
5482 Lisp_Object order; 5480 Lisp_Object order;
5483 { 5481 {
5484 Lisp_Object list; 5482 Lisp_Object list;
5485 int i; 5483 int i;
5486 int indices[DIM (font_sort_order)]; 5484 int indices[DIM (font_sort_order)];
5529 5527
5530 5528
5531 DEFUN ("internal-set-alternative-font-family-alist", 5529 DEFUN ("internal-set-alternative-font-family-alist",
5532 Finternal_set_alternative_font_family_alist, 5530 Finternal_set_alternative_font_family_alist,
5533 Sinternal_set_alternative_font_family_alist, 1, 1, 0, 5531 Sinternal_set_alternative_font_family_alist, 1, 1, 0,
5534 /* Define alternative font families to try in face font selection. 5532 doc: /* Define alternative font families to try in face font selection.
5535 ALIST is an alist of (FAMILY ALTERNATIVE1 ALTERNATIVE2 ...) entries. 5533 ALIST is an alist of (FAMILY ALTERNATIVE1 ALTERNATIVE2 ...) entries.
5536 Each ALTERNATIVE is tried in order if no fonts of font family FAMILY can 5534 Each ALTERNATIVE is tried in order if no fonts of font family FAMILY can
5537 be found. Value is ALIST. */ 5535 be found. Value is ALIST. */)
5538 (alist)) 5536 (alist)
5539 Lisp_Object alist; 5537 Lisp_Object alist;
5540 { 5538 {
5541 CHECK_LIST (alist, 0); 5539 CHECK_LIST (alist, 0);
5542 Vface_alternative_font_family_alist = alist; 5540 Vface_alternative_font_family_alist = alist;
5543 free_all_realized_faces (Qnil); 5541 free_all_realized_faces (Qnil);
5546 5544
5547 5545
5548 DEFUN ("internal-set-alternative-font-registry-alist", 5546 DEFUN ("internal-set-alternative-font-registry-alist",
5549 Finternal_set_alternative_font_registry_alist, 5547 Finternal_set_alternative_font_registry_alist,
5550 Sinternal_set_alternative_font_registry_alist, 1, 1, 0, 5548 Sinternal_set_alternative_font_registry_alist, 1, 1, 0,
5551 /* Define alternative font registries to try in face font selection. 5549 doc: /* Define alternative font registries to try in face font selection.
5552 ALIST is an alist of (REGISTRY ALTERNATIVE1 ALTERNATIVE2 ...) entries. 5550 ALIST is an alist of (REGISTRY ALTERNATIVE1 ALTERNATIVE2 ...) entries.
5553 Each ALTERNATIVE is tried in order if no fonts of font registry REGISTRY can 5551 Each ALTERNATIVE is tried in order if no fonts of font registry REGISTRY can
5554 be found. Value is ALIST. */ 5552 be found. Value is ALIST. */)
5555 (alist)) 5553 (alist)
5556 Lisp_Object alist; 5554 Lisp_Object alist;
5557 { 5555 {
5558 CHECK_LIST (alist, 0); 5556 CHECK_LIST (alist, 0);
5559 Vface_alternative_font_registry_alist = alist; 5557 Vface_alternative_font_registry_alist = alist;
5560 free_all_realized_faces (Qnil); 5558 free_all_realized_faces (Qnil);
6657 6655
6658 6656
6659 DEFUN ("tty-suppress-bold-inverse-default-colors", 6657 DEFUN ("tty-suppress-bold-inverse-default-colors",
6660 Ftty_suppress_bold_inverse_default_colors, 6658 Ftty_suppress_bold_inverse_default_colors,
6661 Stty_suppress_bold_inverse_default_colors, 1, 1, 0, 6659 Stty_suppress_bold_inverse_default_colors, 1, 1, 0,
6662 /* Suppress/allow boldness of faces with inverse default colors. 6660 doc: /* Suppress/allow boldness of faces with inverse default colors.
6663 SUPPRESS non-nil means suppress it. 6661 SUPPRESS non-nil means suppress it.
6664 This affects bold faces on TTYs whose foreground is the default background 6662 This affects bold faces on TTYs whose foreground is the default background
6665 color of the display and whose background is the default foreground color. 6663 color of the display and whose background is the default foreground color.
6666 For such faces, the bold face attribute is ignored if this variable 6664 For such faces, the bold face attribute is ignored if this variable
6667 is non-nil. */ 6665 is non-nil. */)
6668 (suppress)) 6666 (suppress)
6669 Lisp_Object suppress; 6667 Lisp_Object suppress;
6670 { 6668 {
6671 tty_suppress_bold_inverse_default_colors_p = !NILP (suppress); 6669 tty_suppress_bold_inverse_default_colors_p = !NILP (suppress);
6672 ++face_change_count; 6670 ++face_change_count;
6673 return suppress; 6671 return suppress;
6979 fprintf (stderr, "hash: %d\n", face->hash); 6977 fprintf (stderr, "hash: %d\n", face->hash);
6980 fprintf (stderr, "charset: %d\n", face->charset); 6978 fprintf (stderr, "charset: %d\n", face->charset);
6981 } 6979 }
6982 6980
6983 6981
6984 DEFUN ("dump-face", Fdump_face, Sdump_face, 0, 1, 0, /* */ 6982 DEFUN ("dump-face", Fdump_face, Sdump_face, 0, 1, 0, doc: /* */)
6985 (n)) 6983 (n)
6986 Lisp_Object n; 6984 Lisp_Object n;
6987 { 6985 {
6988 if (NILP (n)) 6986 if (NILP (n))
6989 { 6987 {
6990 int i; 6988 int i;
7014 return Qnil; 7012 return Qnil;
7015 } 7013 }
7016 7014
7017 7015
7018 DEFUN ("show-face-resources", Fshow_face_resources, Sshow_face_resources, 7016 DEFUN ("show-face-resources", Fshow_face_resources, Sshow_face_resources,
7019 0, 0, 0, /* */ 7017 0, 0, 0, doc: /* */)
7020 ()) 7018 ()
7021 { 7019 {
7022 fprintf (stderr, "number of colors = %d\n", ncolors_allocated); 7020 fprintf (stderr, "number of colors = %d\n", ncolors_allocated);
7023 fprintf (stderr, "number of pixmaps = %d\n", npixmaps_allocated); 7021 fprintf (stderr, "number of pixmaps = %d\n", npixmaps_allocated);
7024 fprintf (stderr, "number of GCs = %d\n", ngcs); 7022 fprintf (stderr, "number of GCs = %d\n", ngcs);
7025 return Qnil; 7023 return Qnil;
7207 7205
7208 #if defined DEBUG_X_COLORS && defined HAVE_X_WINDOWS 7206 #if defined DEBUG_X_COLORS && defined HAVE_X_WINDOWS
7209 defsubr (&Sdump_colors); 7207 defsubr (&Sdump_colors);
7210 #endif 7208 #endif
7211 7209
7212 DEFVAR_LISP ("font-list-limit", &Vfont_list_limit 7210 DEFVAR_LISP ("font-list-limit", &Vfont_list_limit,
7213 /* *Limit for font matching. 7211 doc: /* *Limit for font matching.
7214 If an integer > 0, font matching functions won't load more than 7212 If an integer > 0, font matching functions won't load more than
7215 that number of fonts when searching for a matching font. */); 7213 that number of fonts when searching for a matching font. */);
7216 Vfont_list_limit = make_number (DEFAULT_FONT_LIST_LIMIT); 7214 Vfont_list_limit = make_number (DEFAULT_FONT_LIST_LIMIT);
7217 7215
7218 DEFVAR_LISP ("face-new-frame-defaults", &Vface_new_frame_defaults 7216 DEFVAR_LISP ("face-new-frame-defaults", &Vface_new_frame_defaults,
7219 /* List of global face definitions (for internal use only.) */); 7217 doc: /* List of global face definitions (for internal use only.) */);
7220 Vface_new_frame_defaults = Qnil; 7218 Vface_new_frame_defaults = Qnil;
7221 7219
7222 DEFVAR_LISP ("face-default-stipple", &Vface_default_stipple 7220 DEFVAR_LISP ("face-default-stipple", &Vface_default_stipple,
7223 /* *Default stipple pattern used on monochrome displays. 7221 doc: /* *Default stipple pattern used on monochrome displays.
7224 This stipple pattern is used on monochrome displays 7222 This stipple pattern is used on monochrome displays
7225 instead of shades of gray for a face background color. 7223 instead of shades of gray for a face background color.
7226 See `set-face-stipple' for possible values for this variable. */); 7224 See `set-face-stipple' for possible values for this variable. */);
7227 Vface_default_stipple = build_string ("gray3"); 7225 Vface_default_stipple = build_string ("gray3");
7228 7226
7229 DEFVAR_LISP ("tty-defined-color-alist", &Vtty_defined_color_alist 7227 DEFVAR_LISP ("tty-defined-color-alist", &Vtty_defined_color_alist,
7230 /* An alist of defined terminal colors and their RGB values. */); 7228 doc: /* An alist of defined terminal colors and their RGB values. */);
7231 Vtty_defined_color_alist = Qnil; 7229 Vtty_defined_color_alist = Qnil;
7232 7230
7233 DEFVAR_LISP ("scalable-fonts-allowed", &Vscalable_fonts_allowed 7231 DEFVAR_LISP ("scalable-fonts-allowed", &Vscalable_fonts_allowed,
7234 /* Allowed scalable fonts. 7232 doc: /* Allowed scalable fonts.
7235 A value of nil means don't allow any scalable fonts. 7233 A value of nil means don't allow any scalable fonts.
7236 A value of t means allow any scalable font. 7234 A value of t means allow any scalable font.
7237 Otherwise, value must be a list of regular expressions. A font may be 7235 Otherwise, value must be a list of regular expressions. A font may be
7238 scaled if its name matches a regular expression in the list. 7236 scaled if its name matches a regular expression in the list.
7239 Note that if value is nil, a scalable font might still be used, if no 7237 Note that if value is nil, a scalable font might still be used, if no
7240 other font of the appropriate family and registry is available. */); 7238 other font of the appropriate family and registry is available. */);
7241 Vscalable_fonts_allowed = Qnil; 7239 Vscalable_fonts_allowed = Qnil;
7242 7240
7243 DEFVAR_LISP ("face-ignored-fonts", &Vface_ignored_fonts 7241 DEFVAR_LISP ("face-ignored-fonts", &Vface_ignored_fonts,
7244 /* List of ignored fonts. 7242 doc: /* List of ignored fonts.
7245 Each element is a regular expression that matches names of fonts to 7243 Each element is a regular expression that matches names of fonts to
7246 ignore. */); 7244 ignore. */);
7247 Vface_ignored_fonts = Qnil; 7245 Vface_ignored_fonts = Qnil;
7248 7246
7249 #ifdef HAVE_WINDOW_SYSTEM 7247 #ifdef HAVE_WINDOW_SYSTEM