diff options
| author | Lars Magne Ingebrigtsen | 2015-01-28 14:21:33 +1100 |
|---|---|---|
| committer | Lars Magne Ingebrigtsen | 2015-01-28 14:21:33 +1100 |
| commit | 7f4f16b3ae6fdb59d83cfc01017668f2a564309f (patch) | |
| tree | 60e4a7f23f949afaed3bc2fddd0a528aef297861 /src | |
| parent | 1a369fc7f1ccec6954344ec1ee0211a4d24c312d (diff) | |
| parent | be2d23e58721b7acc68c0ea654a38e5109df2aa2 (diff) | |
| download | emacs-7f4f16b3ae6fdb59d83cfc01017668f2a564309f.tar.gz emacs-7f4f16b3ae6fdb59d83cfc01017668f2a564309f.zip | |
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 53 | ||||
| -rw-r--r-- | src/dispextern.h | 19 | ||||
| -rw-r--r-- | src/font.c | 6 | ||||
| -rw-r--r-- | src/fontset.c | 2 | ||||
| -rw-r--r-- | src/fringe.c | 2 | ||||
| -rw-r--r-- | src/image.c | 16 | ||||
| -rw-r--r-- | src/xdisp.c | 22 | ||||
| -rw-r--r-- | src/xfaces.c | 522 |
8 files changed, 346 insertions, 296 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 4fc0de7c815..8e5166e22be 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,56 @@ | |||
| 1 | 2015-01-27 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Use bool for boolean in xfaces.c | ||
| 4 | * dispextern.h: Adjust to signature changes. | ||
| 5 | * font.c (font_at, font_range): | ||
| 6 | * fontset.c (Finternal_char_font): | ||
| 7 | * fringe.c (draw_fringe_bitmap_1): | ||
| 8 | * xdisp.c (handle_face_prop, face_before_or_after_it_pos) | ||
| 9 | (get_next_display_element, highlight_trailing_whitespace) | ||
| 10 | (display_string, calc_line_height_property) | ||
| 11 | (note_mode_line_or_margin_highlight, note_mouse_highlight): | ||
| 12 | * xfaces.c (tty_suppress_bold_inverse_default_colors_p) | ||
| 13 | (menu_face_changed_default, recompute_basic_faces) | ||
| 14 | (Fbitmap_spec_p, parse_rgb_list, tty_lookup_color) | ||
| 15 | (tty_defined_color, defined_color, face_color_gray_p) | ||
| 16 | (face_color_supported_p, load_color2, load_face_colors) | ||
| 17 | (Fx_list_fonts, LFACEP, push_named_merge_point) | ||
| 18 | (resolve_face_name, lface_from_face_name_no_resolve) | ||
| 19 | (lface_from_face_name, get_lface_attributes_no_remap) | ||
| 20 | (get_lface_attributes, lface_fully_specified_p) | ||
| 21 | (set_lface_from_font, merge_face_vectors, merge_named_face) | ||
| 22 | (merge_face_ref, Finternal_make_lisp_face) | ||
| 23 | (Finternal_lisp_face_p, Finternal_copy_lisp_face) | ||
| 24 | (Finternal_set_lisp_face_attribute) | ||
| 25 | (update_face_from_frame_parameter, set_font_frame_param) | ||
| 26 | (face_boolean_x_resource_value) | ||
| 27 | (Finternal_set_lisp_face_attribute_from_resource) | ||
| 28 | (x_update_menu_appearance, Finternal_get_lisp_face_attribute) | ||
| 29 | (Finternal_merge_in_global_face, Fface_font, face_attr_equal_p) | ||
| 30 | (lface_equal_p, Finternal_lisp_face_equal_p) | ||
| 31 | (Finternal_lisp_face_empty_p, lface_same_font_attributes_p) | ||
| 32 | (Fcolor_distance, lookup_named_face, lookup_basic_face) | ||
| 33 | (lookup_derived_face, Fface_attributes_as_vector) | ||
| 34 | (x_supports_face_attributes_p, tty_supports_face_attributes_p) | ||
| 35 | (Fdisplay_supports_face_attributes_p, realize_basic_faces) | ||
| 36 | (realize_default_face, realize_named_face) | ||
| 37 | (realize_non_ascii_face, realize_x_face, map_tty_color) | ||
| 38 | (realize_tty_face, compute_char_face, face_at_buffer_position) | ||
| 39 | (face_for_overlay_string, face_at_string_position): | ||
| 40 | Use bool for boolean. | ||
| 41 | * xfaces.c (set_lface_from_font): | ||
| 42 | Return void, since callers never use the result. | ||
| 43 | |||
| 44 | 2015-01-26 Andreas Schwab <schwab@linux-m68k.org> | ||
| 45 | |||
| 46 | * image.c (lookup_pixel_color): Reorder conditions that are | ||
| 47 | written backwards. | ||
| 48 | (x_to_xcolors): Likewise. | ||
| 49 | (x_detect_edges): Likewise. | ||
| 50 | (png_load_body): Likewise. | ||
| 51 | (gif_close): Likewise. | ||
| 52 | (gif_load): Likewise. | ||
| 53 | |||
| 1 | 2015-01-25 Eli Zaretskii <eliz@gnu.org> | 54 | 2015-01-25 Eli Zaretskii <eliz@gnu.org> |
| 2 | 55 | ||
| 3 | Use bool for boolean in w32term.c | 56 | Use bool for boolean in w32term.c |
diff --git a/src/dispextern.h b/src/dispextern.h index e9e6f709079..31e7262d6ec 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -3380,23 +3380,20 @@ char *choose_face_font (struct frame *, Lisp_Object *, Lisp_Object, | |||
| 3380 | #ifdef HAVE_WINDOW_SYSTEM | 3380 | #ifdef HAVE_WINDOW_SYSTEM |
| 3381 | void prepare_face_for_display (struct frame *, struct face *); | 3381 | void prepare_face_for_display (struct frame *, struct face *); |
| 3382 | #endif | 3382 | #endif |
| 3383 | int lookup_named_face (struct frame *, Lisp_Object, int); | 3383 | int lookup_named_face (struct frame *, Lisp_Object, bool); |
| 3384 | int lookup_basic_face (struct frame *, int); | 3384 | int lookup_basic_face (struct frame *, int); |
| 3385 | int smaller_face (struct frame *, int, int); | 3385 | int smaller_face (struct frame *, int, int); |
| 3386 | int face_with_height (struct frame *, int, int); | 3386 | int face_with_height (struct frame *, int, int); |
| 3387 | int lookup_derived_face (struct frame *, Lisp_Object, int, int); | 3387 | int lookup_derived_face (struct frame *, Lisp_Object, int, bool); |
| 3388 | void init_frame_faces (struct frame *); | 3388 | void init_frame_faces (struct frame *); |
| 3389 | void free_frame_faces (struct frame *); | 3389 | void free_frame_faces (struct frame *); |
| 3390 | void recompute_basic_faces (struct frame *); | 3390 | void recompute_basic_faces (struct frame *); |
| 3391 | int face_at_buffer_position (struct window *w, ptrdiff_t pos, | 3391 | int face_at_buffer_position (struct window *, ptrdiff_t, ptrdiff_t *, ptrdiff_t, |
| 3392 | ptrdiff_t *endptr, ptrdiff_t limit, | 3392 | bool, int); |
| 3393 | int mouse, int base_face_id); | 3393 | int face_for_overlay_string (struct window *, ptrdiff_t, ptrdiff_t *, ptrdiff_t, |
| 3394 | int face_for_overlay_string (struct window *w, ptrdiff_t pos, | 3394 | bool, Lisp_Object); |
| 3395 | ptrdiff_t *endptr, ptrdiff_t limit, | 3395 | int face_at_string_position (struct window *, Lisp_Object, ptrdiff_t, ptrdiff_t, |
| 3396 | int mouse, Lisp_Object overlay); | 3396 | ptrdiff_t *, enum face_id, bool); |
| 3397 | int face_at_string_position (struct window *w, Lisp_Object string, | ||
| 3398 | ptrdiff_t pos, ptrdiff_t bufpos, | ||
| 3399 | ptrdiff_t *endptr, enum face_id, int mouse); | ||
| 3400 | int merge_faces (struct frame *, Lisp_Object, int, int); | 3397 | int merge_faces (struct frame *, Lisp_Object, int, int); |
| 3401 | int compute_char_face (struct frame *, int, Lisp_Object); | 3398 | int compute_char_face (struct frame *, int, Lisp_Object); |
| 3402 | void free_all_realized_faces (Lisp_Object); | 3399 | void free_all_realized_faces (Lisp_Object); |
diff --git a/src/font.c b/src/font.c index d1a008e794d..9ea43cdfc85 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -3707,10 +3707,10 @@ font_at (int c, ptrdiff_t pos, struct face *face, struct window *w, | |||
| 3707 | 3707 | ||
| 3708 | if (STRINGP (string)) | 3708 | if (STRINGP (string)) |
| 3709 | face_id = face_at_string_position (w, string, pos, 0, &endptr, | 3709 | face_id = face_at_string_position (w, string, pos, 0, &endptr, |
| 3710 | DEFAULT_FACE_ID, 0); | 3710 | DEFAULT_FACE_ID, false); |
| 3711 | else | 3711 | else |
| 3712 | face_id = face_at_buffer_position (w, pos, &endptr, | 3712 | face_id = face_at_buffer_position (w, pos, &endptr, |
| 3713 | pos + 100, 0, -1); | 3713 | pos + 100, false, -1); |
| 3714 | face = FACE_FROM_ID (f, face_id); | 3714 | face = FACE_FROM_ID (f, face_id); |
| 3715 | } | 3715 | } |
| 3716 | if (multibyte) | 3716 | if (multibyte) |
| @@ -3754,7 +3754,7 @@ font_range (ptrdiff_t pos, ptrdiff_t pos_byte, ptrdiff_t *limit, | |||
| 3754 | int face_id; | 3754 | int face_id; |
| 3755 | 3755 | ||
| 3756 | face_id = face_at_buffer_position (w, pos, &ignore, | 3756 | face_id = face_at_buffer_position (w, pos, &ignore, |
| 3757 | *limit, 0, -1); | 3757 | *limit, false, -1); |
| 3758 | face = FACE_FROM_ID (XFRAME (w->frame), face_id); | 3758 | face = FACE_FROM_ID (XFRAME (w->frame), face_id); |
| 3759 | } | 3759 | } |
| 3760 | } | 3760 | } |
diff --git a/src/fontset.c b/src/fontset.c index 357526bacfe..c0303fa5a34 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -1828,7 +1828,7 @@ DEFUN ("internal-char-font", Finternal_char_font, Sinternal_char_font, 1, 2, 0, | |||
| 1828 | w = XWINDOW (window); | 1828 | w = XWINDOW (window); |
| 1829 | f = XFRAME (w->frame); | 1829 | f = XFRAME (w->frame); |
| 1830 | face_id = face_at_buffer_position (w, pos, &dummy, | 1830 | face_id = face_at_buffer_position (w, pos, &dummy, |
| 1831 | pos + 100, 0, -1); | 1831 | pos + 100, false, -1); |
| 1832 | } | 1832 | } |
| 1833 | if (! CHAR_VALID_P (c)) | 1833 | if (! CHAR_VALID_P (c)) |
| 1834 | return Qnil; | 1834 | return Qnil; |
diff --git a/src/fringe.c b/src/fringe.c index 464379d0cd0..5e5ec60a48f 100644 --- a/src/fringe.c +++ b/src/fringe.c | |||
| @@ -587,7 +587,7 @@ draw_fringe_bitmap_1 (struct window *w, struct glyph_row *row, int left_p, int o | |||
| 587 | if (face_id == DEFAULT_FACE_ID) | 587 | if (face_id == DEFAULT_FACE_ID) |
| 588 | { | 588 | { |
| 589 | Lisp_Object face = fringe_faces[which]; | 589 | Lisp_Object face = fringe_faces[which]; |
| 590 | face_id = NILP (face) ? lookup_named_face (f, Qfringe, 0) | 590 | face_id = NILP (face) ? lookup_named_face (f, Qfringe, false) |
| 591 | : lookup_derived_face (f, face, FRINGE_FACE_ID, 0); | 591 | : lookup_derived_face (f, face, FRINGE_FACE_ID, 0); |
| 592 | if (face_id < 0) | 592 | if (face_id < 0) |
| 593 | face_id = FRINGE_FACE_ID; | 593 | face_id = FRINGE_FACE_ID; |
diff --git a/src/image.c b/src/image.c index 9c09c5596b9..df299bbd164 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -4423,7 +4423,7 @@ lookup_pixel_color (struct frame *f, unsigned long pixel) | |||
| 4423 | Colormap cmap; | 4423 | Colormap cmap; |
| 4424 | bool rc; | 4424 | bool rc; |
| 4425 | 4425 | ||
| 4426 | if (ct_colors_allocated_max <= ct_colors_allocated) | 4426 | if (ct_colors_allocated >= ct_colors_allocated_max) |
| 4427 | return FRAME_FOREGROUND_PIXEL (f); | 4427 | return FRAME_FOREGROUND_PIXEL (f); |
| 4428 | 4428 | ||
| 4429 | #ifdef HAVE_X_WINDOWS | 4429 | #ifdef HAVE_X_WINDOWS |
| @@ -4554,7 +4554,7 @@ x_to_xcolors (struct frame *f, struct image *img, bool rgb_p) | |||
| 4554 | HGDIOBJ prev; | 4554 | HGDIOBJ prev; |
| 4555 | #endif /* HAVE_NTGUI */ | 4555 | #endif /* HAVE_NTGUI */ |
| 4556 | 4556 | ||
| 4557 | if (min (PTRDIFF_MAX, SIZE_MAX) / sizeof *colors / img->width < img->height) | 4557 | if (img->height > min (PTRDIFF_MAX, SIZE_MAX) / sizeof *colors / img->width) |
| 4558 | memory_full (SIZE_MAX); | 4558 | memory_full (SIZE_MAX); |
| 4559 | colors = xmalloc (sizeof *colors * img->width * img->height); | 4559 | colors = xmalloc (sizeof *colors * img->width * img->height); |
| 4560 | 4560 | ||
| @@ -4695,7 +4695,7 @@ x_detect_edges (struct frame *f, struct image *img, int *matrix, int color_adjus | |||
| 4695 | 4695 | ||
| 4696 | #define COLOR(A, X, Y) ((A) + (Y) * img->width + (X)) | 4696 | #define COLOR(A, X, Y) ((A) + (Y) * img->width + (X)) |
| 4697 | 4697 | ||
| 4698 | if (min (PTRDIFF_MAX, SIZE_MAX) / sizeof *new / img->width < img->height) | 4698 | if (img->height > min (PTRDIFF_MAX, SIZE_MAX) / sizeof *new / img->width) |
| 4699 | memory_full (SIZE_MAX); | 4699 | memory_full (SIZE_MAX); |
| 4700 | new = xmalloc (sizeof *new * img->width * img->height); | 4700 | new = xmalloc (sizeof *new * img->width * img->height); |
| 4701 | 4701 | ||
| @@ -5917,8 +5917,8 @@ png_load_body (struct frame *f, struct image *img, struct png_load_context *c) | |||
| 5917 | row_bytes = png_get_rowbytes (png_ptr, info_ptr); | 5917 | row_bytes = png_get_rowbytes (png_ptr, info_ptr); |
| 5918 | 5918 | ||
| 5919 | /* Allocate memory for the image. */ | 5919 | /* Allocate memory for the image. */ |
| 5920 | if (min (PTRDIFF_MAX, SIZE_MAX) / sizeof *rows < height | 5920 | if (height > min (PTRDIFF_MAX, SIZE_MAX) / sizeof *rows |
| 5921 | || min (PTRDIFF_MAX, SIZE_MAX) / sizeof *pixels / height < row_bytes) | 5921 | || row_bytes > min (PTRDIFF_MAX, SIZE_MAX) / sizeof *pixels / height) |
| 5922 | memory_full (SIZE_MAX); | 5922 | memory_full (SIZE_MAX); |
| 5923 | c->pixels = pixels = xmalloc (sizeof *pixels * row_bytes * height); | 5923 | c->pixels = pixels = xmalloc (sizeof *pixels * row_bytes * height); |
| 5924 | c->rows = rows = xmalloc (height * sizeof *rows); | 5924 | c->rows = rows = xmalloc (height * sizeof *rows); |
| @@ -7235,7 +7235,7 @@ gif_image_p (Lisp_Object object) | |||
| 7235 | # ifdef WINDOWSNT | 7235 | # ifdef WINDOWSNT |
| 7236 | 7236 | ||
| 7237 | /* GIF library details. */ | 7237 | /* GIF library details. */ |
| 7238 | # if 5 < GIFLIB_MAJOR + (1 <= GIFLIB_MINOR) | 7238 | # if GIFLIB_MAJOR + (GIFLIB_MINOR >= 1) > 5 |
| 7239 | DEF_DLL_FN (int, DGifCloseFile, (GifFileType *, int *)); | 7239 | DEF_DLL_FN (int, DGifCloseFile, (GifFileType *, int *)); |
| 7240 | # else | 7240 | # else |
| 7241 | DEF_DLL_FN (int, DGifCloseFile, (GifFileType *)); | 7241 | DEF_DLL_FN (int, DGifCloseFile, (GifFileType *)); |
| @@ -7316,7 +7316,7 @@ gif_close (GifFileType *gif, int *err) | |||
| 7316 | { | 7316 | { |
| 7317 | int retval; | 7317 | int retval; |
| 7318 | 7318 | ||
| 7319 | #if 5 < GIFLIB_MAJOR + (1 <= GIFLIB_MINOR) | 7319 | #if GIFLIB_MAJOR + (GIFLIB_MINOR >= 1) > 5 |
| 7320 | retval = DGifCloseFile (gif, err); | 7320 | retval = DGifCloseFile (gif, err); |
| 7321 | #else | 7321 | #else |
| 7322 | retval = DGifCloseFile (gif); | 7322 | retval = DGifCloseFile (gif); |
| @@ -7471,7 +7471,7 @@ gif_load (struct frame *f, struct image *img) | |||
| 7471 | int subimg_height = subimage->ImageDesc.Height; | 7471 | int subimg_height = subimage->ImageDesc.Height; |
| 7472 | int subimg_top = subimage->ImageDesc.Top; | 7472 | int subimg_top = subimage->ImageDesc.Top; |
| 7473 | int subimg_left = subimage->ImageDesc.Left; | 7473 | int subimg_left = subimage->ImageDesc.Left; |
| 7474 | if (! (0 <= subimg_width && 0 <= subimg_height | 7474 | if (! (subimg_width >= 0 && subimg_height >= 0 |
| 7475 | && 0 <= subimg_top && subimg_top <= height - subimg_height | 7475 | && 0 <= subimg_top && subimg_top <= height - subimg_height |
| 7476 | && 0 <= subimg_left && subimg_left <= width - subimg_width)) | 7476 | && 0 <= subimg_left && subimg_left <= width - subimg_width)) |
| 7477 | { | 7477 | { |
diff --git a/src/xdisp.c b/src/xdisp.c index d974687a431..71871ec5885 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -3877,7 +3877,7 @@ handle_face_prop (struct it *it) | |||
| 3877 | &next_stop, | 3877 | &next_stop, |
| 3878 | (IT_CHARPOS (*it) | 3878 | (IT_CHARPOS (*it) |
| 3879 | + TEXT_PROP_DISTANCE_LIMIT), | 3879 | + TEXT_PROP_DISTANCE_LIMIT), |
| 3880 | 0, it->base_face_id); | 3880 | false, it->base_face_id); |
| 3881 | 3881 | ||
| 3882 | /* Is this a start of a run of characters with box face? | 3882 | /* Is this a start of a run of characters with box face? |
| 3883 | Caveat: this can be called for a freshly initialized | 3883 | Caveat: this can be called for a freshly initialized |
| @@ -3953,7 +3953,7 @@ handle_face_prop (struct it *it) | |||
| 3953 | &next_stop, | 3953 | &next_stop, |
| 3954 | (IT_CHARPOS (*it) | 3954 | (IT_CHARPOS (*it) |
| 3955 | + TEXT_PROP_DISTANCE_LIMIT), | 3955 | + TEXT_PROP_DISTANCE_LIMIT), |
| 3956 | 0, | 3956 | false, |
| 3957 | from_overlay); | 3957 | from_overlay); |
| 3958 | } | 3958 | } |
| 3959 | else | 3959 | else |
| @@ -3988,7 +3988,7 @@ handle_face_prop (struct it *it) | |||
| 3988 | IT_STRING_CHARPOS (*it), | 3988 | IT_STRING_CHARPOS (*it), |
| 3989 | bufpos, | 3989 | bufpos, |
| 3990 | &next_stop, | 3990 | &next_stop, |
| 3991 | base_face_id, 0); | 3991 | base_face_id, false); |
| 3992 | 3992 | ||
| 3993 | /* Is this a start of a run of characters with box? Caveat: | 3993 | /* Is this a start of a run of characters with box? Caveat: |
| 3994 | this can be called for a freshly allocated iterator; face_id | 3994 | this can be called for a freshly allocated iterator; face_id |
| @@ -4130,7 +4130,7 @@ face_before_or_after_it_pos (struct it *it, int before_p) | |||
| 4130 | charpos, | 4130 | charpos, |
| 4131 | bufpos, | 4131 | bufpos, |
| 4132 | &next_check_charpos, | 4132 | &next_check_charpos, |
| 4133 | base_face_id, 0); | 4133 | base_face_id, false); |
| 4134 | 4134 | ||
| 4135 | /* Correct the face for charsets different from ASCII. Do it | 4135 | /* Correct the face for charsets different from ASCII. Do it |
| 4136 | for the multibyte case only. The face returned above is | 4136 | for the multibyte case only. The face returned above is |
| @@ -4219,7 +4219,7 @@ face_before_or_after_it_pos (struct it *it, int before_p) | |||
| 4219 | face_id = face_at_buffer_position (it->w, | 4219 | face_id = face_at_buffer_position (it->w, |
| 4220 | CHARPOS (pos), | 4220 | CHARPOS (pos), |
| 4221 | &next_check_charpos, | 4221 | &next_check_charpos, |
| 4222 | limit, 0, -1); | 4222 | limit, false, -1); |
| 4223 | 4223 | ||
| 4224 | /* Correct the face for charsets different from ASCII. Do it | 4224 | /* Correct the face for charsets different from ASCII. Do it |
| 4225 | for the multibyte case only. The face returned above is | 4225 | for the multibyte case only. The face returned above is |
| @@ -7165,7 +7165,7 @@ get_next_display_element (struct it *it) | |||
| 7165 | { | 7165 | { |
| 7166 | next_face_id = face_at_buffer_position | 7166 | next_face_id = face_at_buffer_position |
| 7167 | (it->w, CHARPOS (pos), &ignore, | 7167 | (it->w, CHARPOS (pos), &ignore, |
| 7168 | CHARPOS (pos) + TEXT_PROP_DISTANCE_LIMIT, 0, -1); | 7168 | CHARPOS (pos) + TEXT_PROP_DISTANCE_LIMIT, false, -1); |
| 7169 | it->end_of_box_run_p | 7169 | it->end_of_box_run_p |
| 7170 | = (FACE_FROM_ID (it->f, next_face_id)->box | 7170 | = (FACE_FROM_ID (it->f, next_face_id)->box |
| 7171 | == FACE_NO_BOX); | 7171 | == FACE_NO_BOX); |
| @@ -19551,7 +19551,7 @@ highlight_trailing_whitespace (struct frame *f, struct glyph_row *row) | |||
| 19551 | && glyph->u.ch == ' ')) | 19551 | && glyph->u.ch == ' ')) |
| 19552 | && trailing_whitespace_p (glyph->charpos)) | 19552 | && trailing_whitespace_p (glyph->charpos)) |
| 19553 | { | 19553 | { |
| 19554 | int face_id = lookup_named_face (f, Qtrailing_whitespace, 0); | 19554 | int face_id = lookup_named_face (f, Qtrailing_whitespace, false); |
| 19555 | if (face_id < 0) | 19555 | if (face_id < 0) |
| 19556 | return; | 19556 | return; |
| 19557 | 19557 | ||
| @@ -23561,7 +23561,7 @@ display_string (const char *string, Lisp_Object lisp_string, Lisp_Object face_st | |||
| 23561 | 23561 | ||
| 23562 | it->face_id | 23562 | it->face_id |
| 23563 | = face_at_string_position (it->w, face_string, face_string_pos, | 23563 | = face_at_string_position (it->w, face_string, face_string_pos, |
| 23564 | 0, &endptr, it->base_face_id, 0); | 23564 | 0, &endptr, it->base_face_id, false); |
| 23565 | face = FACE_FROM_ID (it->f, it->face_id); | 23565 | face = FACE_FROM_ID (it->f, it->face_id); |
| 23566 | it->face_box_p = face->box != FACE_NO_BOX; | 23566 | it->face_box_p = face->box != FACE_NO_BOX; |
| 23567 | } | 23567 | } |
| @@ -26067,7 +26067,7 @@ calc_line_height_property (struct it *it, Lisp_Object val, struct font *font, | |||
| 26067 | int face_id; | 26067 | int face_id; |
| 26068 | struct face *face; | 26068 | struct face *face; |
| 26069 | 26069 | ||
| 26070 | face_id = lookup_named_face (it->f, face_name, 0); | 26070 | face_id = lookup_named_face (it->f, face_name, false); |
| 26071 | if (face_id < 0) | 26071 | if (face_id < 0) |
| 26072 | return make_number (-1); | 26072 | return make_number (-1); |
| 26073 | 26073 | ||
| @@ -29283,7 +29283,7 @@ note_mode_line_or_margin_highlight (Lisp_Object window, int x, int y, | |||
| 29283 | charpos, | 29283 | charpos, |
| 29284 | 0, &ignore, | 29284 | 0, &ignore, |
| 29285 | glyph->face_id, | 29285 | glyph->face_id, |
| 29286 | 1); | 29286 | true); |
| 29287 | show_mouse_face (hlinfo, DRAW_MOUSE_FACE); | 29287 | show_mouse_face (hlinfo, DRAW_MOUSE_FACE); |
| 29288 | 29288 | ||
| 29289 | if (NILP (pointer)) | 29289 | if (NILP (pointer)) |
| @@ -29611,7 +29611,7 @@ note_mouse_highlight (struct frame *f, int x, int y) | |||
| 29611 | hlinfo->mouse_face_window = window; | 29611 | hlinfo->mouse_face_window = window; |
| 29612 | hlinfo->mouse_face_face_id | 29612 | hlinfo->mouse_face_face_id |
| 29613 | = face_at_string_position (w, object, pos, 0, &ignore, | 29613 | = face_at_string_position (w, object, pos, 0, &ignore, |
| 29614 | glyph->face_id, 1); | 29614 | glyph->face_id, true); |
| 29615 | show_mouse_face (hlinfo, DRAW_MOUSE_FACE); | 29615 | show_mouse_face (hlinfo, DRAW_MOUSE_FACE); |
| 29616 | cursor = No_Cursor; | 29616 | cursor = No_Cursor; |
| 29617 | } | 29617 | } |
diff --git a/src/xfaces.c b/src/xfaces.c index 31048aece5d..7c9f62683fd 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -265,11 +265,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 265 | 265 | ||
| 266 | #include <c-ctype.h> | 266 | #include <c-ctype.h> |
| 267 | 267 | ||
| 268 | /* Non-zero if face attribute ATTR is unspecified. */ | 268 | /* True if face attribute ATTR is unspecified. */ |
| 269 | 269 | ||
| 270 | #define UNSPECIFIEDP(ATTR) EQ ((ATTR), Qunspecified) | 270 | #define UNSPECIFIEDP(ATTR) EQ ((ATTR), Qunspecified) |
| 271 | 271 | ||
| 272 | /* Non-zero if face attribute ATTR is `ignore-defface'. */ | 272 | /* True if face attribute ATTR is `ignore-defface'. */ |
| 273 | 273 | ||
| 274 | #define IGNORE_DEFFACE_P(ATTR) EQ ((ATTR), QCignore_defface) | 274 | #define IGNORE_DEFFACE_P(ATTR) EQ ((ATTR), QCignore_defface) |
| 275 | 275 | ||
| @@ -318,12 +318,12 @@ static int clear_font_table_count; | |||
| 318 | 318 | ||
| 319 | int face_change_count; | 319 | int face_change_count; |
| 320 | 320 | ||
| 321 | /* Non-zero means don't display bold text if a face's foreground | 321 | /* True means don't display bold text if a face's foreground |
| 322 | and background colors are the inverse of the default colors of the | 322 | and background colors are the inverse of the default colors of the |
| 323 | display. This is a kluge to suppress `bold black' foreground text | 323 | display. This is a kluge to suppress `bold black' foreground text |
| 324 | which is hard to read on an LCD monitor. */ | 324 | which is hard to read on an LCD monitor. */ |
| 325 | 325 | ||
| 326 | static int tty_suppress_bold_inverse_default_colors_p; | 326 | static bool tty_suppress_bold_inverse_default_colors_p; |
| 327 | 327 | ||
| 328 | /* A list of the form `((x . y))' used to avoid consing in | 328 | /* A list of the form `((x . y))' used to avoid consing in |
| 329 | Finternal_set_lisp_face_attribute. */ | 329 | Finternal_set_lisp_face_attribute. */ |
| @@ -338,10 +338,10 @@ static int npixmaps_allocated; | |||
| 338 | static int ngcs; | 338 | static int ngcs; |
| 339 | #endif | 339 | #endif |
| 340 | 340 | ||
| 341 | /* Non-zero means the definition of the `menu' face for new frames has | 341 | /* True means the definition of the `menu' face for new frames has |
| 342 | been changed. */ | 342 | been changed. */ |
| 343 | 343 | ||
| 344 | static int menu_face_changed_default; | 344 | static bool menu_face_changed_default; |
| 345 | 345 | ||
| 346 | struct named_merge_point; | 346 | struct named_merge_point; |
| 347 | 347 | ||
| @@ -354,8 +354,8 @@ static bool realize_default_face (struct frame *); | |||
| 354 | static void realize_named_face (struct frame *, Lisp_Object, int); | 354 | static void realize_named_face (struct frame *, Lisp_Object, int); |
| 355 | static struct face_cache *make_face_cache (struct frame *); | 355 | static struct face_cache *make_face_cache (struct frame *); |
| 356 | static void free_face_cache (struct face_cache *); | 356 | static void free_face_cache (struct face_cache *); |
| 357 | static int merge_face_ref (struct frame *, Lisp_Object, Lisp_Object *, | 357 | static bool merge_face_ref (struct frame *, Lisp_Object, Lisp_Object *, |
| 358 | int, struct named_merge_point *); | 358 | bool, struct named_merge_point *); |
| 359 | static int color_distance (XColor *x, XColor *y); | 359 | static int color_distance (XColor *x, XColor *y); |
| 360 | 360 | ||
| 361 | #ifdef HAVE_WINDOW_SYSTEM | 361 | #ifdef HAVE_WINDOW_SYSTEM |
| @@ -638,14 +638,14 @@ recompute_basic_faces (struct frame *f) | |||
| 638 | { | 638 | { |
| 639 | if (FRAME_FACE_CACHE (f)) | 639 | if (FRAME_FACE_CACHE (f)) |
| 640 | { | 640 | { |
| 641 | clear_face_cache (0); | 641 | clear_face_cache (false); |
| 642 | if (!realize_basic_faces (f)) | 642 | if (!realize_basic_faces (f)) |
| 643 | emacs_abort (); | 643 | emacs_abort (); |
| 644 | } | 644 | } |
| 645 | } | 645 | } |
| 646 | 646 | ||
| 647 | 647 | ||
| 648 | /* Clear the face caches of all frames. CLEAR_FONTS_P non-zero means | 648 | /* Clear the face caches of all frames. CLEAR_FONTS_P means |
| 649 | try to free unused fonts, too. */ | 649 | try to free unused fonts, too. */ |
| 650 | 650 | ||
| 651 | void | 651 | void |
| @@ -715,11 +715,11 @@ the pixmap. Bits are stored row by row, each row occupies | |||
| 715 | \(WIDTH + 7)/8 bytes. */) | 715 | \(WIDTH + 7)/8 bytes. */) |
| 716 | (Lisp_Object object) | 716 | (Lisp_Object object) |
| 717 | { | 717 | { |
| 718 | bool pixmap_p = 0; | 718 | bool pixmap_p = false; |
| 719 | 719 | ||
| 720 | if (STRINGP (object)) | 720 | if (STRINGP (object)) |
| 721 | /* If OBJECT is a string, it's a file name. */ | 721 | /* If OBJECT is a string, it's a file name. */ |
| 722 | pixmap_p = 1; | 722 | pixmap_p = true; |
| 723 | else if (CONSP (object)) | 723 | else if (CONSP (object)) |
| 724 | { | 724 | { |
| 725 | /* Otherwise OBJECT must be (WIDTH HEIGHT DATA), WIDTH and | 725 | /* Otherwise OBJECT must be (WIDTH HEIGHT DATA), WIDTH and |
| @@ -749,7 +749,7 @@ the pixmap. Bits are stored row by row, each row occupies | |||
| 749 | int bytes_per_row = ((XINT (width) + BITS_PER_CHAR - 1) | 749 | int bytes_per_row = ((XINT (width) + BITS_PER_CHAR - 1) |
| 750 | / BITS_PER_CHAR); | 750 | / BITS_PER_CHAR); |
| 751 | if (XINT (height) <= SBYTES (data) / bytes_per_row) | 751 | if (XINT (height) <= SBYTES (data) / bytes_per_row) |
| 752 | pixmap_p = 1; | 752 | pixmap_p = true; |
| 753 | } | 753 | } |
| 754 | } | 754 | } |
| 755 | 755 | ||
| @@ -820,9 +820,9 @@ load_pixmap (struct frame *f, Lisp_Object name) | |||
| 820 | 820 | ||
| 821 | /* Parse RGB_LIST, and fill in the RGB fields of COLOR. | 821 | /* Parse RGB_LIST, and fill in the RGB fields of COLOR. |
| 822 | RGB_LIST should contain (at least) 3 lisp integers. | 822 | RGB_LIST should contain (at least) 3 lisp integers. |
| 823 | Return 0 if there's a problem with RGB_LIST, otherwise return 1. */ | 823 | Return true iff RGB_LIST is OK. */ |
| 824 | 824 | ||
| 825 | static int | 825 | static bool |
| 826 | parse_rgb_list (Lisp_Object rgb_list, XColor *color) | 826 | parse_rgb_list (Lisp_Object rgb_list, XColor *color) |
| 827 | { | 827 | { |
| 828 | #define PARSE_RGB_LIST_FIELD(field) \ | 828 | #define PARSE_RGB_LIST_FIELD(field) \ |
| @@ -832,13 +832,13 @@ parse_rgb_list (Lisp_Object rgb_list, XColor *color) | |||
| 832 | rgb_list = XCDR (rgb_list); \ | 832 | rgb_list = XCDR (rgb_list); \ |
| 833 | } \ | 833 | } \ |
| 834 | else \ | 834 | else \ |
| 835 | return 0; | 835 | return false; |
| 836 | 836 | ||
| 837 | PARSE_RGB_LIST_FIELD (red); | 837 | PARSE_RGB_LIST_FIELD (red); |
| 838 | PARSE_RGB_LIST_FIELD (green); | 838 | PARSE_RGB_LIST_FIELD (green); |
| 839 | PARSE_RGB_LIST_FIELD (blue); | 839 | PARSE_RGB_LIST_FIELD (blue); |
| 840 | 840 | ||
| 841 | return 1; | 841 | return true; |
| 842 | } | 842 | } |
| 843 | 843 | ||
| 844 | 844 | ||
| @@ -854,7 +854,7 @@ tty_lookup_color (struct frame *f, Lisp_Object color, XColor *tty_color, | |||
| 854 | Lisp_Object frame, color_desc; | 854 | Lisp_Object frame, color_desc; |
| 855 | 855 | ||
| 856 | if (!STRINGP (color) || NILP (Ffboundp (Qtty_color_desc))) | 856 | if (!STRINGP (color) || NILP (Ffboundp (Qtty_color_desc))) |
| 857 | return 0; | 857 | return false; |
| 858 | 858 | ||
| 859 | XSETFRAME (frame, f); | 859 | XSETFRAME (frame, f); |
| 860 | 860 | ||
| @@ -864,13 +864,13 @@ tty_lookup_color (struct frame *f, Lisp_Object color, XColor *tty_color, | |||
| 864 | Lisp_Object rgb; | 864 | Lisp_Object rgb; |
| 865 | 865 | ||
| 866 | if (! INTEGERP (XCAR (XCDR (color_desc)))) | 866 | if (! INTEGERP (XCAR (XCDR (color_desc)))) |
| 867 | return 0; | 867 | return false; |
| 868 | 868 | ||
| 869 | tty_color->pixel = XINT (XCAR (XCDR (color_desc))); | 869 | tty_color->pixel = XINT (XCAR (XCDR (color_desc))); |
| 870 | 870 | ||
| 871 | rgb = XCDR (XCDR (color_desc)); | 871 | rgb = XCDR (XCDR (color_desc)); |
| 872 | if (! parse_rgb_list (rgb, tty_color)) | 872 | if (! parse_rgb_list (rgb, tty_color)) |
| 873 | return 0; | 873 | return false; |
| 874 | 874 | ||
| 875 | /* Should we fill in STD_COLOR too? */ | 875 | /* Should we fill in STD_COLOR too? */ |
| 876 | if (std_color) | 876 | if (std_color) |
| @@ -889,21 +889,21 @@ tty_lookup_color (struct frame *f, Lisp_Object color, XColor *tty_color, | |||
| 889 | /* Look up STD_COLOR separately. */ | 889 | /* Look up STD_COLOR separately. */ |
| 890 | rgb = call1 (Qtty_color_standard_values, color); | 890 | rgb = call1 (Qtty_color_standard_values, color); |
| 891 | if (! parse_rgb_list (rgb, std_color)) | 891 | if (! parse_rgb_list (rgb, std_color)) |
| 892 | return 0; | 892 | return false; |
| 893 | } | 893 | } |
| 894 | } | 894 | } |
| 895 | 895 | ||
| 896 | return 1; | 896 | return true; |
| 897 | } | 897 | } |
| 898 | else if (NILP (Fsymbol_value (intern ("tty-defined-color-alist")))) | 898 | else if (NILP (Fsymbol_value (intern ("tty-defined-color-alist")))) |
| 899 | /* We were called early during startup, and the colors are not | 899 | /* We were called early during startup, and the colors are not |
| 900 | yet set up in tty-defined-color-alist. Don't return a failure | 900 | yet set up in tty-defined-color-alist. Don't return a failure |
| 901 | indication, since this produces the annoying "Unable to | 901 | indication, since this produces the annoying "Unable to |
| 902 | load color" messages in the *Messages* buffer. */ | 902 | load color" messages in the *Messages* buffer. */ |
| 903 | return 1; | 903 | return true; |
| 904 | else | 904 | else |
| 905 | /* tty-color-desc seems to have returned a bad value. */ | 905 | /* tty-color-desc seems to have returned a bad value. */ |
| 906 | return 0; | 906 | return false; |
| 907 | } | 907 | } |
| 908 | 908 | ||
| 909 | /* A version of defined_color for non-X frames. */ | 909 | /* A version of defined_color for non-X frames. */ |
| @@ -912,7 +912,7 @@ static bool | |||
| 912 | tty_defined_color (struct frame *f, const char *color_name, | 912 | tty_defined_color (struct frame *f, const char *color_name, |
| 913 | XColor *color_def, bool alloc) | 913 | XColor *color_def, bool alloc) |
| 914 | { | 914 | { |
| 915 | bool status = 1; | 915 | bool status = true; |
| 916 | 916 | ||
| 917 | /* Defaults. */ | 917 | /* Defaults. */ |
| 918 | color_def->pixel = FACE_TTY_DEFAULT_COLOR; | 918 | color_def->pixel = FACE_TTY_DEFAULT_COLOR; |
| @@ -932,7 +932,7 @@ tty_defined_color (struct frame *f, const char *color_name, | |||
| 932 | } | 932 | } |
| 933 | 933 | ||
| 934 | if (color_def->pixel != FACE_TTY_DEFAULT_COLOR) | 934 | if (color_def->pixel != FACE_TTY_DEFAULT_COLOR) |
| 935 | status = 1; | 935 | status = true; |
| 936 | 936 | ||
| 937 | return status; | 937 | return status; |
| 938 | } | 938 | } |
| @@ -960,7 +960,7 @@ defined_color (struct frame *f, const char *color_name, XColor *color_def, | |||
| 960 | #endif | 960 | #endif |
| 961 | #ifdef HAVE_NS | 961 | #ifdef HAVE_NS |
| 962 | else if (FRAME_NS_P (f)) | 962 | else if (FRAME_NS_P (f)) |
| 963 | return ns_defined_color (f, color_name, color_def, alloc, 1); | 963 | return ns_defined_color (f, color_name, color_def, alloc, true); |
| 964 | #endif | 964 | #endif |
| 965 | else | 965 | else |
| 966 | emacs_abort (); | 966 | emacs_abort (); |
| @@ -1000,18 +1000,18 @@ tty_color_name (struct frame *f, int idx) | |||
| 1000 | } | 1000 | } |
| 1001 | 1001 | ||
| 1002 | 1002 | ||
| 1003 | /* Return non-zero if COLOR_NAME is a shade of gray (or white or | 1003 | /* Return true if COLOR_NAME is a shade of gray (or white or |
| 1004 | black) on frame F. | 1004 | black) on frame F. |
| 1005 | 1005 | ||
| 1006 | The criterion implemented here is not a terribly sophisticated one. */ | 1006 | The criterion implemented here is not a terribly sophisticated one. */ |
| 1007 | 1007 | ||
| 1008 | static int | 1008 | static bool |
| 1009 | face_color_gray_p (struct frame *f, const char *color_name) | 1009 | face_color_gray_p (struct frame *f, const char *color_name) |
| 1010 | { | 1010 | { |
| 1011 | XColor color; | 1011 | XColor color; |
| 1012 | int gray_p; | 1012 | bool gray_p; |
| 1013 | 1013 | ||
| 1014 | if (defined_color (f, color_name, &color, 0)) | 1014 | if (defined_color (f, color_name, &color, false)) |
| 1015 | gray_p = (/* Any color sufficiently close to black counts as gray. */ | 1015 | gray_p = (/* Any color sufficiently close to black counts as gray. */ |
| 1016 | (color.red < 5000 && color.green < 5000 && color.blue < 5000) | 1016 | (color.red < 5000 && color.green < 5000 && color.blue < 5000) |
| 1017 | || | 1017 | || |
| @@ -1022,19 +1022,18 @@ face_color_gray_p (struct frame *f, const char *color_name) | |||
| 1022 | && (eabs (color.blue - color.red) | 1022 | && (eabs (color.blue - color.red) |
| 1023 | < max (color.blue, color.red) / 20))); | 1023 | < max (color.blue, color.red) / 20))); |
| 1024 | else | 1024 | else |
| 1025 | gray_p = 0; | 1025 | gray_p = false; |
| 1026 | 1026 | ||
| 1027 | return gray_p; | 1027 | return gray_p; |
| 1028 | } | 1028 | } |
| 1029 | 1029 | ||
| 1030 | 1030 | ||
| 1031 | /* Return non-zero if color COLOR_NAME can be displayed on frame F. | 1031 | /* Return true if color COLOR_NAME can be displayed on frame F. |
| 1032 | BACKGROUND_P non-zero means the color will be used as background | 1032 | BACKGROUND_P means the color will be used as background color. */ |
| 1033 | color. */ | ||
| 1034 | 1033 | ||
| 1035 | static int | 1034 | static bool |
| 1036 | face_color_supported_p (struct frame *f, const char *color_name, | 1035 | face_color_supported_p (struct frame *f, const char *color_name, |
| 1037 | int background_p) | 1036 | bool background_p) |
| 1038 | { | 1037 | { |
| 1039 | Lisp_Object frame; | 1038 | Lisp_Object frame; |
| 1040 | XColor not_used; | 1039 | XColor not_used; |
| @@ -1052,7 +1051,7 @@ face_color_supported_p (struct frame *f, const char *color_name, | |||
| 1052 | && face_color_gray_p (f, color_name))) | 1051 | && face_color_gray_p (f, color_name))) |
| 1053 | : | 1052 | : |
| 1054 | #endif | 1053 | #endif |
| 1055 | tty_defined_color (f, color_name, ¬_used, 0); | 1054 | tty_defined_color (f, color_name, ¬_used, false); |
| 1056 | } | 1055 | } |
| 1057 | 1056 | ||
| 1058 | 1057 | ||
| @@ -1098,39 +1097,39 @@ load_color2 (struct frame *f, struct face *face, Lisp_Object name, | |||
| 1098 | 1097 | ||
| 1099 | /* if the color map is full, defined_color will return a best match | 1098 | /* if the color map is full, defined_color will return a best match |
| 1100 | to the values in an existing cell. */ | 1099 | to the values in an existing cell. */ |
| 1101 | if (!defined_color (f, SSDATA (name), color, 1)) | 1100 | if (!defined_color (f, SSDATA (name), color, true)) |
| 1102 | { | 1101 | { |
| 1103 | add_to_log ("Unable to load color \"%s\"", name, Qnil); | 1102 | add_to_log ("Unable to load color \"%s\"", name, Qnil); |
| 1104 | 1103 | ||
| 1105 | switch (target_index) | 1104 | switch (target_index) |
| 1106 | { | 1105 | { |
| 1107 | case LFACE_FOREGROUND_INDEX: | 1106 | case LFACE_FOREGROUND_INDEX: |
| 1108 | face->foreground_defaulted_p = 1; | 1107 | face->foreground_defaulted_p = true; |
| 1109 | color->pixel = FRAME_FOREGROUND_PIXEL (f); | 1108 | color->pixel = FRAME_FOREGROUND_PIXEL (f); |
| 1110 | break; | 1109 | break; |
| 1111 | 1110 | ||
| 1112 | case LFACE_BACKGROUND_INDEX: | 1111 | case LFACE_BACKGROUND_INDEX: |
| 1113 | face->background_defaulted_p = 1; | 1112 | face->background_defaulted_p = true; |
| 1114 | color->pixel = FRAME_BACKGROUND_PIXEL (f); | 1113 | color->pixel = FRAME_BACKGROUND_PIXEL (f); |
| 1115 | break; | 1114 | break; |
| 1116 | 1115 | ||
| 1117 | case LFACE_UNDERLINE_INDEX: | 1116 | case LFACE_UNDERLINE_INDEX: |
| 1118 | face->underline_defaulted_p = 1; | 1117 | face->underline_defaulted_p = true; |
| 1119 | color->pixel = FRAME_FOREGROUND_PIXEL (f); | 1118 | color->pixel = FRAME_FOREGROUND_PIXEL (f); |
| 1120 | break; | 1119 | break; |
| 1121 | 1120 | ||
| 1122 | case LFACE_OVERLINE_INDEX: | 1121 | case LFACE_OVERLINE_INDEX: |
| 1123 | face->overline_color_defaulted_p = 1; | 1122 | face->overline_color_defaulted_p = true; |
| 1124 | color->pixel = FRAME_FOREGROUND_PIXEL (f); | 1123 | color->pixel = FRAME_FOREGROUND_PIXEL (f); |
| 1125 | break; | 1124 | break; |
| 1126 | 1125 | ||
| 1127 | case LFACE_STRIKE_THROUGH_INDEX: | 1126 | case LFACE_STRIKE_THROUGH_INDEX: |
| 1128 | face->strike_through_color_defaulted_p = 1; | 1127 | face->strike_through_color_defaulted_p = true; |
| 1129 | color->pixel = FRAME_FOREGROUND_PIXEL (f); | 1128 | color->pixel = FRAME_FOREGROUND_PIXEL (f); |
| 1130 | break; | 1129 | break; |
| 1131 | 1130 | ||
| 1132 | case LFACE_BOX_INDEX: | 1131 | case LFACE_BOX_INDEX: |
| 1133 | face->box_color_defaulted_p = 1; | 1132 | face->box_color_defaulted_p = true; |
| 1134 | color->pixel = FRAME_FOREGROUND_PIXEL (f); | 1133 | color->pixel = FRAME_FOREGROUND_PIXEL (f); |
| 1135 | break; | 1134 | break; |
| 1136 | 1135 | ||
| @@ -1196,7 +1195,7 @@ load_face_colors (struct frame *f, struct face *face, | |||
| 1196 | face_color_supported_p is smart enough to know that grays are | 1195 | face_color_supported_p is smart enough to know that grays are |
| 1197 | "supported" as background because we are supposed to use stipple | 1196 | "supported" as background because we are supposed to use stipple |
| 1198 | for them. */ | 1197 | for them. */ |
| 1199 | if (!face_color_supported_p (f, SSDATA (bg), 0) | 1198 | if (!face_color_supported_p (f, SSDATA (bg), false) |
| 1200 | && !NILP (Fbitmap_spec_p (Vface_default_stipple))) | 1199 | && !NILP (Fbitmap_spec_p (Vface_default_stipple))) |
| 1201 | { | 1200 | { |
| 1202 | x_destroy_bitmap (f, face->stipple); | 1201 | x_destroy_bitmap (f, face->stipple); |
| @@ -1561,7 +1560,7 @@ the WIDTH times as wide as FACE on FRAME. */) | |||
| 1561 | { | 1560 | { |
| 1562 | /* This is of limited utility since it works with character | 1561 | /* This is of limited utility since it works with character |
| 1563 | widths. Keep it for compatibility. --gerd. */ | 1562 | widths. Keep it for compatibility. --gerd. */ |
| 1564 | int face_id = lookup_named_face (f, face, 0); | 1563 | int face_id = lookup_named_face (f, face, false); |
| 1565 | struct face *width_face = (face_id < 0 | 1564 | struct face *width_face = (face_id < 0 |
| 1566 | ? NULL | 1565 | ? NULL |
| 1567 | : FACE_FROM_ID (f, face_id)); | 1566 | : FACE_FROM_ID (f, face_id)); |
| @@ -1643,7 +1642,7 @@ the WIDTH times as wide as FACE on FRAME. */) | |||
| 1643 | #define LFACE_DISTANT_FOREGROUND(LFACE) \ | 1642 | #define LFACE_DISTANT_FOREGROUND(LFACE) \ |
| 1644 | AREF ((LFACE), LFACE_DISTANT_FOREGROUND_INDEX) | 1643 | AREF ((LFACE), LFACE_DISTANT_FOREGROUND_INDEX) |
| 1645 | 1644 | ||
| 1646 | /* Non-zero if LFACE is a Lisp face. A Lisp face is a vector of size | 1645 | /* True if LFACE is a Lisp face. A Lisp face is a vector of size |
| 1647 | LFACE_VECTOR_SIZE which has the symbol `face' in slot 0. */ | 1646 | LFACE_VECTOR_SIZE which has the symbol `face' in slot 0. */ |
| 1648 | 1647 | ||
| 1649 | #define LFACEP(LFACE) \ | 1648 | #define LFACEP(LFACE) \ |
| @@ -1773,12 +1772,12 @@ struct named_merge_point | |||
| 1773 | }; | 1772 | }; |
| 1774 | 1773 | ||
| 1775 | 1774 | ||
| 1776 | /* If a face merging cycle is detected for FACE_NAME, return 0, | 1775 | /* If a face merging cycle is detected for FACE_NAME, return false, |
| 1777 | otherwise add NEW_NAMED_MERGE_POINT, which is initialized using | 1776 | otherwise add NEW_NAMED_MERGE_POINT, which is initialized using |
| 1778 | FACE_NAME and NAMED_MERGE_POINT_KIND, as the head of the linked list | 1777 | FACE_NAME and NAMED_MERGE_POINT_KIND, as the head of the linked list |
| 1779 | pointed to by NAMED_MERGE_POINTS, and return 1. */ | 1778 | pointed to by NAMED_MERGE_POINTS, and return true. */ |
| 1780 | 1779 | ||
| 1781 | static int | 1780 | static bool |
| 1782 | push_named_merge_point (struct named_merge_point *new_named_merge_point, | 1781 | push_named_merge_point (struct named_merge_point *new_named_merge_point, |
| 1783 | Lisp_Object face_name, | 1782 | Lisp_Object face_name, |
| 1784 | enum named_merge_point_kind named_merge_point_kind, | 1783 | enum named_merge_point_kind named_merge_point_kind, |
| @@ -1791,7 +1790,7 @@ push_named_merge_point (struct named_merge_point *new_named_merge_point, | |||
| 1791 | { | 1790 | { |
| 1792 | if (prev->named_merge_point_kind == named_merge_point_kind) | 1791 | if (prev->named_merge_point_kind == named_merge_point_kind) |
| 1793 | /* A cycle, so fail. */ | 1792 | /* A cycle, so fail. */ |
| 1794 | return 0; | 1793 | return false; |
| 1795 | else if (prev->named_merge_point_kind == NAMED_MERGE_POINT_REMAP) | 1794 | else if (prev->named_merge_point_kind == NAMED_MERGE_POINT_REMAP) |
| 1796 | /* A remap `hides ' any previous normal merge points | 1795 | /* A remap `hides ' any previous normal merge points |
| 1797 | (because the remap means that it's actually different face), | 1796 | (because the remap means that it's actually different face), |
| @@ -1806,7 +1805,7 @@ push_named_merge_point (struct named_merge_point *new_named_merge_point, | |||
| 1806 | 1805 | ||
| 1807 | *named_merge_points = new_named_merge_point; | 1806 | *named_merge_points = new_named_merge_point; |
| 1808 | 1807 | ||
| 1809 | return 1; | 1808 | return true; |
| 1810 | } | 1809 | } |
| 1811 | 1810 | ||
| 1812 | 1811 | ||
| @@ -1817,7 +1816,7 @@ push_named_merge_point (struct named_merge_point *new_named_merge_point, | |||
| 1817 | Return default face in case of errors. */ | 1816 | Return default face in case of errors. */ |
| 1818 | 1817 | ||
| 1819 | static Lisp_Object | 1818 | static Lisp_Object |
| 1820 | resolve_face_name (Lisp_Object face_name, int signal_p) | 1819 | resolve_face_name (Lisp_Object face_name, bool signal_p) |
| 1821 | { | 1820 | { |
| 1822 | Lisp_Object orig_face; | 1821 | Lisp_Object orig_face; |
| 1823 | Lisp_Object tortoise, hare; | 1822 | Lisp_Object tortoise, hare; |
| @@ -1831,7 +1830,7 @@ resolve_face_name (Lisp_Object face_name, int signal_p) | |||
| 1831 | orig_face = face_name; | 1830 | orig_face = face_name; |
| 1832 | tortoise = hare = face_name; | 1831 | tortoise = hare = face_name; |
| 1833 | 1832 | ||
| 1834 | while (1) | 1833 | while (true) |
| 1835 | { | 1834 | { |
| 1836 | face_name = hare; | 1835 | face_name = hare; |
| 1837 | hare = Fget (hare, Qface_alias); | 1836 | hare = Fget (hare, Qface_alias); |
| @@ -1859,12 +1858,12 @@ resolve_face_name (Lisp_Object face_name, int signal_p) | |||
| 1859 | /* Return the face definition of FACE_NAME on frame F. F null means | 1858 | /* Return the face definition of FACE_NAME on frame F. F null means |
| 1860 | return the definition for new frames. FACE_NAME may be a string or | 1859 | return the definition for new frames. FACE_NAME may be a string or |
| 1861 | a symbol (apparently Emacs 20.2 allowed strings as face names in | 1860 | a symbol (apparently Emacs 20.2 allowed strings as face names in |
| 1862 | face text properties; Ediff uses that). If SIGNAL_P is non-zero, | 1861 | face text properties; Ediff uses that). |
| 1863 | signal an error if FACE_NAME is not a valid face name. If SIGNAL_P | 1862 | If SIGNAL_P, signal an error if FACE_NAME is not a valid face name. |
| 1864 | is zero, value is nil if FACE_NAME is not a valid face name. */ | 1863 | Otherwise, value is nil if FACE_NAME is not a valid face name. */ |
| 1865 | static Lisp_Object | 1864 | static Lisp_Object |
| 1866 | lface_from_face_name_no_resolve (struct frame *f, Lisp_Object face_name, | 1865 | lface_from_face_name_no_resolve (struct frame *f, Lisp_Object face_name, |
| 1867 | int signal_p) | 1866 | bool signal_p) |
| 1868 | { | 1867 | { |
| 1869 | Lisp_Object lface; | 1868 | Lisp_Object lface; |
| 1870 | 1869 | ||
| @@ -1887,12 +1886,11 @@ lface_from_face_name_no_resolve (struct frame *f, Lisp_Object face_name, | |||
| 1887 | return the definition for new frames. FACE_NAME may be a string or | 1886 | return the definition for new frames. FACE_NAME may be a string or |
| 1888 | a symbol (apparently Emacs 20.2 allowed strings as face names in | 1887 | a symbol (apparently Emacs 20.2 allowed strings as face names in |
| 1889 | face text properties; Ediff uses that). If FACE_NAME is an alias | 1888 | face text properties; Ediff uses that). If FACE_NAME is an alias |
| 1890 | for another face, return that face's definition. If SIGNAL_P is | 1889 | for another face, return that face's definition. |
| 1891 | non-zero, signal an error if FACE_NAME is not a valid face name. | 1890 | If SIGNAL_P, signal an error if FACE_NAME is not a valid face name. |
| 1892 | If SIGNAL_P is zero, value is nil if FACE_NAME is not a valid face | 1891 | Otherwise, value is nil if FACE_NAME is not a valid face name. */ |
| 1893 | name. */ | ||
| 1894 | static Lisp_Object | 1892 | static Lisp_Object |
| 1895 | lface_from_face_name (struct frame *f, Lisp_Object face_name, int signal_p) | 1893 | lface_from_face_name (struct frame *f, Lisp_Object face_name, bool signal_p) |
| 1896 | { | 1894 | { |
| 1897 | face_name = resolve_face_name (face_name, signal_p); | 1895 | face_name = resolve_face_name (face_name, signal_p); |
| 1898 | return lface_from_face_name_no_resolve (f, face_name, signal_p); | 1896 | return lface_from_face_name_no_resolve (f, face_name, signal_p); |
| @@ -1901,14 +1899,14 @@ lface_from_face_name (struct frame *f, Lisp_Object face_name, int signal_p) | |||
| 1901 | 1899 | ||
| 1902 | /* Get face attributes of face FACE_NAME from frame-local faces on | 1900 | /* Get face attributes of face FACE_NAME from frame-local faces on |
| 1903 | frame F. Store the resulting attributes in ATTRS which must point | 1901 | frame F. Store the resulting attributes in ATTRS which must point |
| 1904 | to a vector of Lisp_Objects of size LFACE_VECTOR_SIZE. If SIGNAL_P | 1902 | to a vector of Lisp_Objects of size LFACE_VECTOR_SIZE. |
| 1905 | is non-zero, signal an error if FACE_NAME does not name a face. | 1903 | If SIGNAL_P, signal an error if FACE_NAME does not name a face. |
| 1906 | Otherwise, value is zero if FACE_NAME is not a face. */ | 1904 | Otherwise, return true iff FACE_NAME is a face. */ |
| 1907 | 1905 | ||
| 1908 | static int | 1906 | static bool |
| 1909 | get_lface_attributes_no_remap (struct frame *f, Lisp_Object face_name, | 1907 | get_lface_attributes_no_remap (struct frame *f, Lisp_Object face_name, |
| 1910 | Lisp_Object attrs[LFACE_VECTOR_SIZE], | 1908 | Lisp_Object attrs[LFACE_VECTOR_SIZE], |
| 1911 | int signal_p) | 1909 | bool signal_p) |
| 1912 | { | 1910 | { |
| 1913 | Lisp_Object lface; | 1911 | Lisp_Object lface; |
| 1914 | 1912 | ||
| @@ -1924,13 +1922,13 @@ get_lface_attributes_no_remap (struct frame *f, Lisp_Object face_name, | |||
| 1924 | /* Get face attributes of face FACE_NAME from frame-local faces on frame | 1922 | /* Get face attributes of face FACE_NAME from frame-local faces on frame |
| 1925 | F. Store the resulting attributes in ATTRS which must point to a | 1923 | F. Store the resulting attributes in ATTRS which must point to a |
| 1926 | vector of Lisp_Objects of size LFACE_VECTOR_SIZE. If FACE_NAME is an | 1924 | vector of Lisp_Objects of size LFACE_VECTOR_SIZE. If FACE_NAME is an |
| 1927 | alias for another face, use that face's definition. If SIGNAL_P is | 1925 | alias for another face, use that face's definition. |
| 1928 | non-zero, signal an error if FACE_NAME does not name a face. | 1926 | If SIGNAL_P, signal an error if FACE_NAME does not name a face. |
| 1929 | Otherwise, value is zero if FACE_NAME is not a face. */ | 1927 | Otherwise, return true iff FACE_NAME is a face. */ |
| 1930 | 1928 | ||
| 1931 | static int | 1929 | static bool |
| 1932 | get_lface_attributes (struct frame *f, Lisp_Object face_name, | 1930 | get_lface_attributes (struct frame *f, Lisp_Object face_name, |
| 1933 | Lisp_Object attrs[LFACE_VECTOR_SIZE], int signal_p, | 1931 | Lisp_Object attrs[LFACE_VECTOR_SIZE], bool signal_p, |
| 1934 | struct named_merge_point *named_merge_points) | 1932 | struct named_merge_point *named_merge_points) |
| 1935 | { | 1933 | { |
| 1936 | Lisp_Object face_remapping; | 1934 | Lisp_Object face_remapping; |
| @@ -1963,10 +1961,10 @@ get_lface_attributes (struct frame *f, Lisp_Object face_name, | |||
| 1963 | } | 1961 | } |
| 1964 | 1962 | ||
| 1965 | 1963 | ||
| 1966 | /* Non-zero if all attributes in face attribute vector ATTRS are | 1964 | /* True iff all attributes in face attribute vector ATTRS are |
| 1967 | specified, i.e. are non-nil. */ | 1965 | specified, i.e. are non-nil. */ |
| 1968 | 1966 | ||
| 1969 | static int | 1967 | static bool |
| 1970 | lface_fully_specified_p (Lisp_Object attrs[LFACE_VECTOR_SIZE]) | 1968 | lface_fully_specified_p (Lisp_Object attrs[LFACE_VECTOR_SIZE]) |
| 1971 | { | 1969 | { |
| 1972 | int i; | 1970 | int i; |
| @@ -1983,13 +1981,13 @@ lface_fully_specified_p (Lisp_Object attrs[LFACE_VECTOR_SIZE]) | |||
| 1983 | #ifdef HAVE_WINDOW_SYSTEM | 1981 | #ifdef HAVE_WINDOW_SYSTEM |
| 1984 | 1982 | ||
| 1985 | /* Set font-related attributes of Lisp face LFACE from FONT-OBJECT. | 1983 | /* Set font-related attributes of Lisp face LFACE from FONT-OBJECT. |
| 1986 | If FORCE_P is zero, set only unspecified attributes of LFACE. The | 1984 | If FORCE_P, set only unspecified attributes of LFACE. The |
| 1987 | exception is `font' attribute. It is set to FONT_OBJECT regardless | 1985 | exception is `font' attribute. It is set to FONT_OBJECT regardless |
| 1988 | of FORCE_P. */ | 1986 | of FORCE_P. */ |
| 1989 | 1987 | ||
| 1990 | static int | 1988 | static void |
| 1991 | set_lface_from_font (struct frame *f, Lisp_Object lface, | 1989 | set_lface_from_font (struct frame *f, Lisp_Object lface, |
| 1992 | Lisp_Object font_object, int force_p) | 1990 | Lisp_Object font_object, bool force_p) |
| 1993 | { | 1991 | { |
| 1994 | Lisp_Object val; | 1992 | Lisp_Object val; |
| 1995 | struct font *font = XFONT_OBJECT (font_object); | 1993 | struct font *font = XFONT_OBJECT (font_object); |
| @@ -2037,7 +2035,6 @@ set_lface_from_font (struct frame *f, Lisp_Object lface, | |||
| 2037 | } | 2035 | } |
| 2038 | 2036 | ||
| 2039 | ASET (lface, LFACE_FONT_INDEX, font_object); | 2037 | ASET (lface, LFACE_FONT_INDEX, font_object); |
| 2040 | return 1; | ||
| 2041 | } | 2038 | } |
| 2042 | 2039 | ||
| 2043 | #endif /* HAVE_WINDOW_SYSTEM */ | 2040 | #endif /* HAVE_WINDOW_SYSTEM */ |
| @@ -2108,7 +2105,7 @@ merge_face_vectors (struct frame *f, Lisp_Object *from, Lisp_Object *to, | |||
| 2108 | other code uses `unspecified' as a generic value for face attributes. */ | 2105 | other code uses `unspecified' as a generic value for face attributes. */ |
| 2109 | if (!UNSPECIFIEDP (from[LFACE_INHERIT_INDEX]) | 2106 | if (!UNSPECIFIEDP (from[LFACE_INHERIT_INDEX]) |
| 2110 | && !NILP (from[LFACE_INHERIT_INDEX])) | 2107 | && !NILP (from[LFACE_INHERIT_INDEX])) |
| 2111 | merge_face_ref (f, from[LFACE_INHERIT_INDEX], to, 0, named_merge_points); | 2108 | merge_face_ref (f, from[LFACE_INHERIT_INDEX], to, false, named_merge_points); |
| 2112 | 2109 | ||
| 2113 | if (FONT_SPEC_P (from[LFACE_FONT_INDEX])) | 2110 | if (FONT_SPEC_P (from[LFACE_FONT_INDEX])) |
| 2114 | { | 2111 | { |
| @@ -2166,11 +2163,11 @@ merge_face_vectors (struct frame *f, Lisp_Object *from, Lisp_Object *to, | |||
| 2166 | } | 2163 | } |
| 2167 | 2164 | ||
| 2168 | /* Merge the named face FACE_NAME on frame F, into the vector of face | 2165 | /* Merge the named face FACE_NAME on frame F, into the vector of face |
| 2169 | attributes TO. NAMED_MERGE_POINTS is used to detect loops in face | 2166 | attributes TO. Use NAMED_MERGE_POINTS to detect loops in face |
| 2170 | inheritance. Returns true if FACE_NAME is a valid face name and | 2167 | inheritance. Return true if FACE_NAME is a valid face name and |
| 2171 | merging succeeded. */ | 2168 | merging succeeded. */ |
| 2172 | 2169 | ||
| 2173 | static int | 2170 | static bool |
| 2174 | merge_named_face (struct frame *f, Lisp_Object face_name, Lisp_Object *to, | 2171 | merge_named_face (struct frame *f, Lisp_Object face_name, Lisp_Object *to, |
| 2175 | struct named_merge_point *named_merge_points) | 2172 | struct named_merge_point *named_merge_points) |
| 2176 | { | 2173 | { |
| @@ -2182,7 +2179,8 @@ merge_named_face (struct frame *f, Lisp_Object face_name, Lisp_Object *to, | |||
| 2182 | { | 2179 | { |
| 2183 | struct gcpro gcpro1; | 2180 | struct gcpro gcpro1; |
| 2184 | Lisp_Object from[LFACE_VECTOR_SIZE]; | 2181 | Lisp_Object from[LFACE_VECTOR_SIZE]; |
| 2185 | int ok = get_lface_attributes (f, face_name, from, 0, named_merge_points); | 2182 | bool ok = get_lface_attributes (f, face_name, from, false, |
| 2183 | named_merge_points); | ||
| 2186 | 2184 | ||
| 2187 | if (ok) | 2185 | if (ok) |
| 2188 | { | 2186 | { |
| @@ -2194,15 +2192,15 @@ merge_named_face (struct frame *f, Lisp_Object face_name, Lisp_Object *to, | |||
| 2194 | return ok; | 2192 | return ok; |
| 2195 | } | 2193 | } |
| 2196 | else | 2194 | else |
| 2197 | return 0; | 2195 | return false; |
| 2198 | } | 2196 | } |
| 2199 | 2197 | ||
| 2200 | 2198 | ||
| 2201 | /* Merge face attributes from the lisp `face reference' FACE_REF on | 2199 | /* Merge face attributes from the lisp `face reference' FACE_REF on |
| 2202 | frame F into the face attribute vector TO. If ERR_MSGS is non-zero, | 2200 | frame F into the face attribute vector TO. If ERR_MSGS, |
| 2203 | problems with FACE_REF cause an error message to be shown. Return | 2201 | problems with FACE_REF cause an error message to be shown. Return |
| 2204 | non-zero if no errors occurred (regardless of the value of ERR_MSGS). | 2202 | true if no errors occurred (regardless of the value of ERR_MSGS). |
| 2205 | NAMED_MERGE_POINTS is used to detect loops in face inheritance or | 2203 | Use NAMED_MERGE_POINTS to detect loops in face inheritance or |
| 2206 | list structure; it may be 0 for most callers. | 2204 | list structure; it may be 0 for most callers. |
| 2207 | 2205 | ||
| 2208 | FACE_REF may be a single face specification or a list of such | 2206 | FACE_REF may be a single face specification or a list of such |
| @@ -2221,11 +2219,11 @@ merge_named_face (struct frame *f, Lisp_Object face_name, Lisp_Object *to, | |||
| 2221 | Face specifications earlier in lists take precedence over later | 2219 | Face specifications earlier in lists take precedence over later |
| 2222 | specifications. */ | 2220 | specifications. */ |
| 2223 | 2221 | ||
| 2224 | static int | 2222 | static bool |
| 2225 | merge_face_ref (struct frame *f, Lisp_Object face_ref, Lisp_Object *to, | 2223 | merge_face_ref (struct frame *f, Lisp_Object face_ref, Lisp_Object *to, |
| 2226 | int err_msgs, struct named_merge_point *named_merge_points) | 2224 | bool err_msgs, struct named_merge_point *named_merge_points) |
| 2227 | { | 2225 | { |
| 2228 | int ok = 1; /* Succeed without an error? */ | 2226 | bool ok = true; /* Succeed without an error? */ |
| 2229 | 2227 | ||
| 2230 | if (CONSP (face_ref)) | 2228 | if (CONSP (face_ref)) |
| 2231 | { | 2229 | { |
| @@ -2250,7 +2248,7 @@ merge_face_ref (struct frame *f, Lisp_Object face_ref, Lisp_Object *to, | |||
| 2250 | { | 2248 | { |
| 2251 | if (err_msgs) | 2249 | if (err_msgs) |
| 2252 | add_to_log ("Invalid face color", color_name, Qnil); | 2250 | add_to_log ("Invalid face color", color_name, Qnil); |
| 2253 | ok = 0; | 2251 | ok = false; |
| 2254 | } | 2252 | } |
| 2255 | } | 2253 | } |
| 2256 | else if (SYMBOLP (first) | 2254 | else if (SYMBOLP (first) |
| @@ -2261,7 +2259,7 @@ merge_face_ref (struct frame *f, Lisp_Object face_ref, Lisp_Object *to, | |||
| 2261 | { | 2259 | { |
| 2262 | Lisp_Object keyword = XCAR (face_ref); | 2260 | Lisp_Object keyword = XCAR (face_ref); |
| 2263 | Lisp_Object value = XCAR (XCDR (face_ref)); | 2261 | Lisp_Object value = XCAR (XCDR (face_ref)); |
| 2264 | int err = 0; | 2262 | bool err = false; |
| 2265 | 2263 | ||
| 2266 | /* Specifying `unspecified' is a no-op. */ | 2264 | /* Specifying `unspecified' is a no-op. */ |
| 2267 | if (EQ (value, Qunspecified)) | 2265 | if (EQ (value, Qunspecified)) |
| @@ -2274,7 +2272,7 @@ merge_face_ref (struct frame *f, Lisp_Object face_ref, Lisp_Object *to, | |||
| 2274 | font_clear_prop (to, FONT_FAMILY_INDEX); | 2272 | font_clear_prop (to, FONT_FAMILY_INDEX); |
| 2275 | } | 2273 | } |
| 2276 | else | 2274 | else |
| 2277 | err = 1; | 2275 | err = true; |
| 2278 | } | 2276 | } |
| 2279 | else if (EQ (keyword, QCfoundry)) | 2277 | else if (EQ (keyword, QCfoundry)) |
| 2280 | { | 2278 | { |
| @@ -2284,7 +2282,7 @@ merge_face_ref (struct frame *f, Lisp_Object face_ref, Lisp_Object *to, | |||
| 2284 | font_clear_prop (to, FONT_FOUNDRY_INDEX); | 2282 | font_clear_prop (to, FONT_FOUNDRY_INDEX); |
| 2285 | } | 2283 | } |
| 2286 | else | 2284 | else |
| 2287 | err = 1; | 2285 | err = true; |
| 2288 | } | 2286 | } |
| 2289 | else if (EQ (keyword, QCheight)) | 2287 | else if (EQ (keyword, QCheight)) |
| 2290 | { | 2288 | { |
| @@ -2297,7 +2295,7 @@ merge_face_ref (struct frame *f, Lisp_Object face_ref, Lisp_Object *to, | |||
| 2297 | font_clear_prop (to, FONT_SIZE_INDEX); | 2295 | font_clear_prop (to, FONT_SIZE_INDEX); |
| 2298 | } | 2296 | } |
| 2299 | else | 2297 | else |
| 2300 | err = 1; | 2298 | err = true; |
| 2301 | } | 2299 | } |
| 2302 | else if (EQ (keyword, QCweight)) | 2300 | else if (EQ (keyword, QCweight)) |
| 2303 | { | 2301 | { |
| @@ -2307,7 +2305,7 @@ merge_face_ref (struct frame *f, Lisp_Object face_ref, Lisp_Object *to, | |||
| 2307 | font_clear_prop (to, FONT_WEIGHT_INDEX); | 2305 | font_clear_prop (to, FONT_WEIGHT_INDEX); |
| 2308 | } | 2306 | } |
| 2309 | else | 2307 | else |
| 2310 | err = 1; | 2308 | err = true; |
| 2311 | } | 2309 | } |
| 2312 | else if (EQ (keyword, QCslant)) | 2310 | else if (EQ (keyword, QCslant)) |
| 2313 | { | 2311 | { |
| @@ -2317,7 +2315,7 @@ merge_face_ref (struct frame *f, Lisp_Object face_ref, Lisp_Object *to, | |||
| 2317 | font_clear_prop (to, FONT_SLANT_INDEX); | 2315 | font_clear_prop (to, FONT_SLANT_INDEX); |
| 2318 | } | 2316 | } |
| 2319 | else | 2317 | else |
| 2320 | err = 1; | 2318 | err = true; |
| 2321 | } | 2319 | } |
| 2322 | else if (EQ (keyword, QCunderline)) | 2320 | else if (EQ (keyword, QCunderline)) |
| 2323 | { | 2321 | { |
| @@ -2327,7 +2325,7 @@ merge_face_ref (struct frame *f, Lisp_Object face_ref, Lisp_Object *to, | |||
| 2327 | || CONSP (value)) | 2325 | || CONSP (value)) |
| 2328 | to[LFACE_UNDERLINE_INDEX] = value; | 2326 | to[LFACE_UNDERLINE_INDEX] = value; |
| 2329 | else | 2327 | else |
| 2330 | err = 1; | 2328 | err = true; |
| 2331 | } | 2329 | } |
| 2332 | else if (EQ (keyword, QCoverline)) | 2330 | else if (EQ (keyword, QCoverline)) |
| 2333 | { | 2331 | { |
| @@ -2336,7 +2334,7 @@ merge_face_ref (struct frame *f, Lisp_Object face_ref, Lisp_Object *to, | |||
| 2336 | || STRINGP (value)) | 2334 | || STRINGP (value)) |
| 2337 | to[LFACE_OVERLINE_INDEX] = value; | 2335 | to[LFACE_OVERLINE_INDEX] = value; |
| 2338 | else | 2336 | else |
| 2339 | err = 1; | 2337 | err = true; |
| 2340 | } | 2338 | } |
| 2341 | else if (EQ (keyword, QCstrike_through)) | 2339 | else if (EQ (keyword, QCstrike_through)) |
| 2342 | { | 2340 | { |
| @@ -2345,7 +2343,7 @@ merge_face_ref (struct frame *f, Lisp_Object face_ref, Lisp_Object *to, | |||
| 2345 | || STRINGP (value)) | 2343 | || STRINGP (value)) |
| 2346 | to[LFACE_STRIKE_THROUGH_INDEX] = value; | 2344 | to[LFACE_STRIKE_THROUGH_INDEX] = value; |
| 2347 | else | 2345 | else |
| 2348 | err = 1; | 2346 | err = true; |
| 2349 | } | 2347 | } |
| 2350 | else if (EQ (keyword, QCbox)) | 2348 | else if (EQ (keyword, QCbox)) |
| 2351 | { | 2349 | { |
| @@ -2357,7 +2355,7 @@ merge_face_ref (struct frame *f, Lisp_Object face_ref, Lisp_Object *to, | |||
| 2357 | || NILP (value)) | 2355 | || NILP (value)) |
| 2358 | to[LFACE_BOX_INDEX] = value; | 2356 | to[LFACE_BOX_INDEX] = value; |
| 2359 | else | 2357 | else |
| 2360 | err = 1; | 2358 | err = true; |
| 2361 | } | 2359 | } |
| 2362 | else if (EQ (keyword, QCinverse_video) | 2360 | else if (EQ (keyword, QCinverse_video) |
| 2363 | || EQ (keyword, QCreverse_video)) | 2361 | || EQ (keyword, QCreverse_video)) |
| @@ -2365,28 +2363,28 @@ merge_face_ref (struct frame *f, Lisp_Object face_ref, Lisp_Object *to, | |||
| 2365 | if (EQ (value, Qt) || NILP (value)) | 2363 | if (EQ (value, Qt) || NILP (value)) |
| 2366 | to[LFACE_INVERSE_INDEX] = value; | 2364 | to[LFACE_INVERSE_INDEX] = value; |
| 2367 | else | 2365 | else |
| 2368 | err = 1; | 2366 | err = true; |
| 2369 | } | 2367 | } |
| 2370 | else if (EQ (keyword, QCforeground)) | 2368 | else if (EQ (keyword, QCforeground)) |
| 2371 | { | 2369 | { |
| 2372 | if (STRINGP (value)) | 2370 | if (STRINGP (value)) |
| 2373 | to[LFACE_FOREGROUND_INDEX] = value; | 2371 | to[LFACE_FOREGROUND_INDEX] = value; |
| 2374 | else | 2372 | else |
| 2375 | err = 1; | 2373 | err = true; |
| 2376 | } | 2374 | } |
| 2377 | else if (EQ (keyword, QCdistant_foreground)) | 2375 | else if (EQ (keyword, QCdistant_foreground)) |
| 2378 | { | 2376 | { |
| 2379 | if (STRINGP (value)) | 2377 | if (STRINGP (value)) |
| 2380 | to[LFACE_DISTANT_FOREGROUND_INDEX] = value; | 2378 | to[LFACE_DISTANT_FOREGROUND_INDEX] = value; |
| 2381 | else | 2379 | else |
| 2382 | err = 1; | 2380 | err = true; |
| 2383 | } | 2381 | } |
| 2384 | else if (EQ (keyword, QCbackground)) | 2382 | else if (EQ (keyword, QCbackground)) |
| 2385 | { | 2383 | { |
| 2386 | if (STRINGP (value)) | 2384 | if (STRINGP (value)) |
| 2387 | to[LFACE_BACKGROUND_INDEX] = value; | 2385 | to[LFACE_BACKGROUND_INDEX] = value; |
| 2388 | else | 2386 | else |
| 2389 | err = 1; | 2387 | err = true; |
| 2390 | } | 2388 | } |
| 2391 | else if (EQ (keyword, QCstipple)) | 2389 | else if (EQ (keyword, QCstipple)) |
| 2392 | { | 2390 | { |
| @@ -2395,7 +2393,7 @@ merge_face_ref (struct frame *f, Lisp_Object face_ref, Lisp_Object *to, | |||
| 2395 | if (!NILP (pixmap_p)) | 2393 | if (!NILP (pixmap_p)) |
| 2396 | to[LFACE_STIPPLE_INDEX] = value; | 2394 | to[LFACE_STIPPLE_INDEX] = value; |
| 2397 | else | 2395 | else |
| 2398 | err = 1; | 2396 | err = true; |
| 2399 | #endif /* HAVE_WINDOW_SYSTEM */ | 2397 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 2400 | } | 2398 | } |
| 2401 | else if (EQ (keyword, QCwidth)) | 2399 | else if (EQ (keyword, QCwidth)) |
| @@ -2406,14 +2404,14 @@ merge_face_ref (struct frame *f, Lisp_Object face_ref, Lisp_Object *to, | |||
| 2406 | font_clear_prop (to, FONT_WIDTH_INDEX); | 2404 | font_clear_prop (to, FONT_WIDTH_INDEX); |
| 2407 | } | 2405 | } |
| 2408 | else | 2406 | else |
| 2409 | err = 1; | 2407 | err = true; |
| 2410 | } | 2408 | } |
| 2411 | else if (EQ (keyword, QCfont)) | 2409 | else if (EQ (keyword, QCfont)) |
| 2412 | { | 2410 | { |
| 2413 | if (FONTP (value)) | 2411 | if (FONTP (value)) |
| 2414 | to[LFACE_FONT_INDEX] = value; | 2412 | to[LFACE_FONT_INDEX] = value; |
| 2415 | else | 2413 | else |
| 2416 | err = 1; | 2414 | err = true; |
| 2417 | } | 2415 | } |
| 2418 | else if (EQ (keyword, QCinherit)) | 2416 | else if (EQ (keyword, QCinherit)) |
| 2419 | { | 2417 | { |
| @@ -2421,15 +2419,15 @@ merge_face_ref (struct frame *f, Lisp_Object face_ref, Lisp_Object *to, | |||
| 2421 | normal face reference. */ | 2419 | normal face reference. */ |
| 2422 | if (! merge_face_ref (f, value, to, | 2420 | if (! merge_face_ref (f, value, to, |
| 2423 | err_msgs, named_merge_points)) | 2421 | err_msgs, named_merge_points)) |
| 2424 | err = 1; | 2422 | err = true; |
| 2425 | } | 2423 | } |
| 2426 | else | 2424 | else |
| 2427 | err = 1; | 2425 | err = true; |
| 2428 | 2426 | ||
| 2429 | if (err) | 2427 | if (err) |
| 2430 | { | 2428 | { |
| 2431 | add_to_log ("Invalid face attribute %S %S", keyword, value); | 2429 | add_to_log ("Invalid face attribute %S %S", keyword, value); |
| 2432 | ok = 0; | 2430 | ok = false; |
| 2433 | } | 2431 | } |
| 2434 | 2432 | ||
| 2435 | face_ref = XCDR (XCDR (face_ref)); | 2433 | face_ref = XCDR (XCDR (face_ref)); |
| @@ -2446,7 +2444,7 @@ merge_face_ref (struct frame *f, Lisp_Object face_ref, Lisp_Object *to, | |||
| 2446 | ok = merge_face_ref (f, next, to, err_msgs, named_merge_points); | 2444 | ok = merge_face_ref (f, next, to, err_msgs, named_merge_points); |
| 2447 | 2445 | ||
| 2448 | if (! merge_face_ref (f, first, to, err_msgs, named_merge_points)) | 2446 | if (! merge_face_ref (f, first, to, err_msgs, named_merge_points)) |
| 2449 | ok = 0; | 2447 | ok = false; |
| 2450 | } | 2448 | } |
| 2451 | } | 2449 | } |
| 2452 | else | 2450 | else |
| @@ -2475,13 +2473,13 @@ Value is a vector of face attributes. */) | |||
| 2475 | int i; | 2473 | int i; |
| 2476 | 2474 | ||
| 2477 | CHECK_SYMBOL (face); | 2475 | CHECK_SYMBOL (face); |
| 2478 | global_lface = lface_from_face_name (NULL, face, 0); | 2476 | global_lface = lface_from_face_name (NULL, face, false); |
| 2479 | 2477 | ||
| 2480 | if (!NILP (frame)) | 2478 | if (!NILP (frame)) |
| 2481 | { | 2479 | { |
| 2482 | CHECK_LIVE_FRAME (frame); | 2480 | CHECK_LIVE_FRAME (frame); |
| 2483 | f = XFRAME (frame); | 2481 | f = XFRAME (frame); |
| 2484 | lface = lface_from_face_name (f, face, 0); | 2482 | lface = lface_from_face_name (f, face, false); |
| 2485 | } | 2483 | } |
| 2486 | else | 2484 | else |
| 2487 | f = NULL, lface = Qnil; | 2485 | f = NULL, lface = Qnil; |
| @@ -2557,15 +2555,15 @@ Otherwise check for the existence of a global face. */) | |||
| 2557 | { | 2555 | { |
| 2558 | Lisp_Object lface; | 2556 | Lisp_Object lface; |
| 2559 | 2557 | ||
| 2560 | face = resolve_face_name (face, 1); | 2558 | face = resolve_face_name (face, true); |
| 2561 | 2559 | ||
| 2562 | if (!NILP (frame)) | 2560 | if (!NILP (frame)) |
| 2563 | { | 2561 | { |
| 2564 | CHECK_LIVE_FRAME (frame); | 2562 | CHECK_LIVE_FRAME (frame); |
| 2565 | lface = lface_from_face_name (XFRAME (frame), face, 0); | 2563 | lface = lface_from_face_name (XFRAME (frame), face, false); |
| 2566 | } | 2564 | } |
| 2567 | else | 2565 | else |
| 2568 | lface = lface_from_face_name (NULL, face, 0); | 2566 | lface = lface_from_face_name (NULL, face, false); |
| 2569 | 2567 | ||
| 2570 | return lface; | 2568 | return lface; |
| 2571 | } | 2569 | } |
| @@ -2592,7 +2590,7 @@ The value is TO. */) | |||
| 2592 | { | 2590 | { |
| 2593 | /* Copy global definition of FROM. We don't make copies of | 2591 | /* Copy global definition of FROM. We don't make copies of |
| 2594 | strings etc. because 20.2 didn't do it either. */ | 2592 | strings etc. because 20.2 didn't do it either. */ |
| 2595 | lface = lface_from_face_name (NULL, from, 1); | 2593 | lface = lface_from_face_name (NULL, from, true); |
| 2596 | copy = Finternal_make_lisp_face (to, Qnil); | 2594 | copy = Finternal_make_lisp_face (to, Qnil); |
| 2597 | } | 2595 | } |
| 2598 | else | 2596 | else |
| @@ -2602,7 +2600,7 @@ The value is TO. */) | |||
| 2602 | new_frame = frame; | 2600 | new_frame = frame; |
| 2603 | CHECK_LIVE_FRAME (frame); | 2601 | CHECK_LIVE_FRAME (frame); |
| 2604 | CHECK_LIVE_FRAME (new_frame); | 2602 | CHECK_LIVE_FRAME (new_frame); |
| 2605 | lface = lface_from_face_name (XFRAME (frame), from, 1); | 2603 | lface = lface_from_face_name (XFRAME (frame), from, true); |
| 2606 | copy = Finternal_make_lisp_face (to, new_frame); | 2604 | copy = Finternal_make_lisp_face (to, new_frame); |
| 2607 | } | 2605 | } |
| 2608 | 2606 | ||
| @@ -2642,7 +2640,7 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 2642 | CHECK_SYMBOL (face); | 2640 | CHECK_SYMBOL (face); |
| 2643 | CHECK_SYMBOL (attr); | 2641 | CHECK_SYMBOL (attr); |
| 2644 | 2642 | ||
| 2645 | face = resolve_face_name (face, 1); | 2643 | face = resolve_face_name (face, true); |
| 2646 | 2644 | ||
| 2647 | /* If FRAME is 0, change face on all frames, and change the | 2645 | /* If FRAME is 0, change face on all frames, and change the |
| 2648 | default for new frames. */ | 2646 | default for new frames. */ |
| @@ -2658,7 +2656,7 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 2658 | /* Set lface to the Lisp attribute vector of FACE. */ | 2656 | /* Set lface to the Lisp attribute vector of FACE. */ |
| 2659 | if (EQ (frame, Qt)) | 2657 | if (EQ (frame, Qt)) |
| 2660 | { | 2658 | { |
| 2661 | lface = lface_from_face_name (NULL, face, 1); | 2659 | lface = lface_from_face_name (NULL, face, true); |
| 2662 | 2660 | ||
| 2663 | /* When updating face-new-frame-defaults, we put :ignore-defface | 2661 | /* When updating face-new-frame-defaults, we put :ignore-defface |
| 2664 | where the caller wants `unspecified'. This forces the frame | 2662 | where the caller wants `unspecified'. This forces the frame |
| @@ -2675,7 +2673,7 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 2675 | frame = selected_frame; | 2673 | frame = selected_frame; |
| 2676 | 2674 | ||
| 2677 | CHECK_LIVE_FRAME (frame); | 2675 | CHECK_LIVE_FRAME (frame); |
| 2678 | lface = lface_from_face_name (XFRAME (frame), face, 0); | 2676 | lface = lface_from_face_name (XFRAME (frame), face, false); |
| 2679 | 2677 | ||
| 2680 | /* If a frame-local face doesn't exist yet, create one. */ | 2678 | /* If a frame-local face doesn't exist yet, create one. */ |
| 2681 | if (NILP (lface)) | 2679 | if (NILP (lface)) |
| @@ -2760,14 +2758,14 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 2760 | } | 2758 | } |
| 2761 | else if (EQ (attr, QCunderline)) | 2759 | else if (EQ (attr, QCunderline)) |
| 2762 | { | 2760 | { |
| 2763 | bool valid_p = 0; | 2761 | bool valid_p = false; |
| 2764 | 2762 | ||
| 2765 | if (UNSPECIFIEDP (value) || IGNORE_DEFFACE_P (value)) | 2763 | if (UNSPECIFIEDP (value) || IGNORE_DEFFACE_P (value)) |
| 2766 | valid_p = 1; | 2764 | valid_p = true; |
| 2767 | else if (NILP (value) || EQ (value, Qt)) | 2765 | else if (NILP (value) || EQ (value, Qt)) |
| 2768 | valid_p = 1; | 2766 | valid_p = true; |
| 2769 | else if (STRINGP (value) && SCHARS (value) > 0) | 2767 | else if (STRINGP (value) && SCHARS (value) > 0) |
| 2770 | valid_p = 1; | 2768 | valid_p = true; |
| 2771 | else if (CONSP (value)) | 2769 | else if (CONSP (value)) |
| 2772 | { | 2770 | { |
| 2773 | Lisp_Object key, val, list; | 2771 | Lisp_Object key, val, list; |
| @@ -2779,7 +2777,7 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 2779 | Non-nil symbols other than t are not documented as being valid. | 2777 | Non-nil symbols other than t are not documented as being valid. |
| 2780 | Eg compare with inverse-video, which explicitly rejects them. | 2778 | Eg compare with inverse-video, which explicitly rejects them. |
| 2781 | */ | 2779 | */ |
| 2782 | valid_p = 1; | 2780 | valid_p = true; |
| 2783 | 2781 | ||
| 2784 | while (!NILP (CAR_SAFE(list))) | 2782 | while (!NILP (CAR_SAFE(list))) |
| 2785 | { | 2783 | { |
| @@ -2790,7 +2788,7 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 2790 | 2788 | ||
| 2791 | if (NILP (key) || NILP (val)) | 2789 | if (NILP (key) || NILP (val)) |
| 2792 | { | 2790 | { |
| 2793 | valid_p = 0; | 2791 | valid_p = false; |
| 2794 | break; | 2792 | break; |
| 2795 | } | 2793 | } |
| 2796 | 2794 | ||
| @@ -2798,14 +2796,14 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 2798 | && !(EQ (val, Qforeground_color) | 2796 | && !(EQ (val, Qforeground_color) |
| 2799 | || (STRINGP (val) && SCHARS (val) > 0))) | 2797 | || (STRINGP (val) && SCHARS (val) > 0))) |
| 2800 | { | 2798 | { |
| 2801 | valid_p = 0; | 2799 | valid_p = false; |
| 2802 | break; | 2800 | break; |
| 2803 | } | 2801 | } |
| 2804 | 2802 | ||
| 2805 | else if (EQ (key, QCstyle) | 2803 | else if (EQ (key, QCstyle) |
| 2806 | && !(EQ (val, Qline) || EQ (val, Qwave))) | 2804 | && !(EQ (val, Qline) || EQ (val, Qwave))) |
| 2807 | { | 2805 | { |
| 2808 | valid_p = 0; | 2806 | valid_p = false; |
| 2809 | break; | 2807 | break; |
| 2810 | } | 2808 | } |
| 2811 | } | 2809 | } |
| @@ -2855,9 +2853,9 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 2855 | value = make_number (1); | 2853 | value = make_number (1); |
| 2856 | 2854 | ||
| 2857 | if (UNSPECIFIEDP (value) || IGNORE_DEFFACE_P (value)) | 2855 | if (UNSPECIFIEDP (value) || IGNORE_DEFFACE_P (value)) |
| 2858 | valid_p = 1; | 2856 | valid_p = true; |
| 2859 | else if (NILP (value)) | 2857 | else if (NILP (value)) |
| 2860 | valid_p = 1; | 2858 | valid_p = true; |
| 2861 | else if (INTEGERP (value)) | 2859 | else if (INTEGERP (value)) |
| 2862 | valid_p = XINT (value) != 0; | 2860 | valid_p = XINT (value) != 0; |
| 2863 | else if (STRINGP (value)) | 2861 | else if (STRINGP (value)) |
| @@ -2900,7 +2898,7 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 2900 | valid_p = NILP (tem); | 2898 | valid_p = NILP (tem); |
| 2901 | } | 2899 | } |
| 2902 | else | 2900 | else |
| 2903 | valid_p = 0; | 2901 | valid_p = false; |
| 2904 | 2902 | ||
| 2905 | if (!valid_p) | 2903 | if (!valid_p) |
| 2906 | signal_error ("Invalid face box", value); | 2904 | signal_error ("Invalid face box", value); |
| @@ -3042,7 +3040,7 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 3042 | signal_error ("Font not available", value); | 3040 | signal_error ("Font not available", value); |
| 3043 | value = font_object; | 3041 | value = font_object; |
| 3044 | } | 3042 | } |
| 3045 | set_lface_from_font (f, lface, value, 1); | 3043 | set_lface_from_font (f, lface, value, true); |
| 3046 | } | 3044 | } |
| 3047 | } | 3045 | } |
| 3048 | else | 3046 | else |
| @@ -3187,10 +3185,10 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 3187 | struct frame *f = XFRAME (frame); | 3185 | struct frame *f = XFRAME (frame); |
| 3188 | if (FRAME_FACE_CACHE (f) == NULL) | 3186 | if (FRAME_FACE_CACHE (f) == NULL) |
| 3189 | FRAME_FACE_CACHE (f) = make_face_cache (f); | 3187 | FRAME_FACE_CACHE (f) = make_face_cache (f); |
| 3190 | FRAME_FACE_CACHE (f)->menu_face_changed_p = 1; | 3188 | FRAME_FACE_CACHE (f)->menu_face_changed_p = true; |
| 3191 | } | 3189 | } |
| 3192 | else | 3190 | else |
| 3193 | menu_face_changed_default = 1; | 3191 | menu_face_changed_default = true; |
| 3194 | } | 3192 | } |
| 3195 | 3193 | ||
| 3196 | if (!NILP (param)) | 3194 | if (!NILP (param)) |
| @@ -3235,7 +3233,7 @@ update_face_from_frame_parameter (struct frame *f, Lisp_Object param, | |||
| 3235 | if (EQ (param, Qforeground_color)) | 3233 | if (EQ (param, Qforeground_color)) |
| 3236 | { | 3234 | { |
| 3237 | face = Qdefault; | 3235 | face = Qdefault; |
| 3238 | lface = lface_from_face_name (f, face, 1); | 3236 | lface = lface_from_face_name (f, face, true); |
| 3239 | ASET (lface, LFACE_FOREGROUND_INDEX, | 3237 | ASET (lface, LFACE_FOREGROUND_INDEX, |
| 3240 | (STRINGP (new_value) ? new_value : Qunspecified)); | 3238 | (STRINGP (new_value) ? new_value : Qunspecified)); |
| 3241 | realize_basic_faces (f); | 3239 | realize_basic_faces (f); |
| @@ -3251,7 +3249,7 @@ update_face_from_frame_parameter (struct frame *f, Lisp_Object param, | |||
| 3251 | call1 (Qframe_set_background_mode, frame); | 3249 | call1 (Qframe_set_background_mode, frame); |
| 3252 | 3250 | ||
| 3253 | face = Qdefault; | 3251 | face = Qdefault; |
| 3254 | lface = lface_from_face_name (f, face, 1); | 3252 | lface = lface_from_face_name (f, face, true); |
| 3255 | ASET (lface, LFACE_BACKGROUND_INDEX, | 3253 | ASET (lface, LFACE_BACKGROUND_INDEX, |
| 3256 | (STRINGP (new_value) ? new_value : Qunspecified)); | 3254 | (STRINGP (new_value) ? new_value : Qunspecified)); |
| 3257 | realize_basic_faces (f); | 3255 | realize_basic_faces (f); |
| @@ -3260,21 +3258,21 @@ update_face_from_frame_parameter (struct frame *f, Lisp_Object param, | |||
| 3260 | else if (EQ (param, Qborder_color)) | 3258 | else if (EQ (param, Qborder_color)) |
| 3261 | { | 3259 | { |
| 3262 | face = Qborder; | 3260 | face = Qborder; |
| 3263 | lface = lface_from_face_name (f, face, 1); | 3261 | lface = lface_from_face_name (f, face, true); |
| 3264 | ASET (lface, LFACE_BACKGROUND_INDEX, | 3262 | ASET (lface, LFACE_BACKGROUND_INDEX, |
| 3265 | (STRINGP (new_value) ? new_value : Qunspecified)); | 3263 | (STRINGP (new_value) ? new_value : Qunspecified)); |
| 3266 | } | 3264 | } |
| 3267 | else if (EQ (param, Qcursor_color)) | 3265 | else if (EQ (param, Qcursor_color)) |
| 3268 | { | 3266 | { |
| 3269 | face = Qcursor; | 3267 | face = Qcursor; |
| 3270 | lface = lface_from_face_name (f, face, 1); | 3268 | lface = lface_from_face_name (f, face, true); |
| 3271 | ASET (lface, LFACE_BACKGROUND_INDEX, | 3269 | ASET (lface, LFACE_BACKGROUND_INDEX, |
| 3272 | (STRINGP (new_value) ? new_value : Qunspecified)); | 3270 | (STRINGP (new_value) ? new_value : Qunspecified)); |
| 3273 | } | 3271 | } |
| 3274 | else if (EQ (param, Qmouse_color)) | 3272 | else if (EQ (param, Qmouse_color)) |
| 3275 | { | 3273 | { |
| 3276 | face = Qmouse; | 3274 | face = Qmouse; |
| 3277 | lface = lface_from_face_name (f, face, 1); | 3275 | lface = lface_from_face_name (f, face, true); |
| 3278 | ASET (lface, LFACE_BACKGROUND_INDEX, | 3276 | ASET (lface, LFACE_BACKGROUND_INDEX, |
| 3279 | (STRINGP (new_value) ? new_value : Qunspecified)); | 3277 | (STRINGP (new_value) ? new_value : Qunspecified)); |
| 3280 | } | 3278 | } |
| @@ -3318,7 +3316,7 @@ set_font_frame_param (Lisp_Object frame, Lisp_Object lface) | |||
| 3318 | return; | 3316 | return; |
| 3319 | ASET (lface, LFACE_FONT_INDEX, font); | 3317 | ASET (lface, LFACE_FONT_INDEX, font); |
| 3320 | } | 3318 | } |
| 3321 | f->default_face_done_p = 0; | 3319 | f->default_face_done_p = false; |
| 3322 | AUTO_FRAME_ARG (arg, Qfont, font); | 3320 | AUTO_FRAME_ARG (arg, Qfont, font); |
| 3323 | Fmodify_frame_parameters (frame, arg); | 3321 | Fmodify_frame_parameters (frame, arg); |
| 3324 | } | 3322 | } |
| @@ -3348,11 +3346,11 @@ ordinary `x-get-resource' doesn't take a frame argument. */) | |||
| 3348 | 3346 | ||
| 3349 | /* Return resource string VALUE as a boolean value, i.e. nil, or t. | 3347 | /* Return resource string VALUE as a boolean value, i.e. nil, or t. |
| 3350 | If VALUE is "on" or "true", return t. If VALUE is "off" or | 3348 | If VALUE is "on" or "true", return t. If VALUE is "off" or |
| 3351 | "false", return nil. Otherwise, if SIGNAL_P is non-zero, signal an | 3349 | "false", return nil. Otherwise, if SIGNAL_P, signal an |
| 3352 | error; if SIGNAL_P is zero, return 0. */ | 3350 | error; if !SIGNAL_P, return 0. */ |
| 3353 | 3351 | ||
| 3354 | static Lisp_Object | 3352 | static Lisp_Object |
| 3355 | face_boolean_x_resource_value (Lisp_Object value, int signal_p) | 3353 | face_boolean_x_resource_value (Lisp_Object value, bool signal_p) |
| 3356 | { | 3354 | { |
| 3357 | Lisp_Object result = make_number (0); | 3355 | Lisp_Object result = make_number (0); |
| 3358 | 3356 | ||
| @@ -3392,11 +3390,11 @@ DEFUN ("internal-set-lisp-face-attribute-from-resource", | |||
| 3392 | signal_error ("Invalid face height from X resource", value); | 3390 | signal_error ("Invalid face height from X resource", value); |
| 3393 | } | 3391 | } |
| 3394 | else if (EQ (attr, QCbold) || EQ (attr, QCitalic)) | 3392 | else if (EQ (attr, QCbold) || EQ (attr, QCitalic)) |
| 3395 | value = face_boolean_x_resource_value (value, 1); | 3393 | value = face_boolean_x_resource_value (value, true); |
| 3396 | else if (EQ (attr, QCweight) || EQ (attr, QCslant) || EQ (attr, QCwidth)) | 3394 | else if (EQ (attr, QCweight) || EQ (attr, QCslant) || EQ (attr, QCwidth)) |
| 3397 | value = intern (SSDATA (value)); | 3395 | value = intern (SSDATA (value)); |
| 3398 | else if (EQ (attr, QCreverse_video) || EQ (attr, QCinverse_video)) | 3396 | else if (EQ (attr, QCreverse_video) || EQ (attr, QCinverse_video)) |
| 3399 | value = face_boolean_x_resource_value (value, 1); | 3397 | value = face_boolean_x_resource_value (value, true); |
| 3400 | else if (EQ (attr, QCunderline) | 3398 | else if (EQ (attr, QCunderline) |
| 3401 | || EQ (attr, QCoverline) | 3399 | || EQ (attr, QCoverline) |
| 3402 | || EQ (attr, QCstrike_through)) | 3400 | || EQ (attr, QCstrike_through)) |
| @@ -3405,7 +3403,7 @@ DEFUN ("internal-set-lisp-face-attribute-from-resource", | |||
| 3405 | 3403 | ||
| 3406 | /* If the result of face_boolean_x_resource_value is t or nil, | 3404 | /* If the result of face_boolean_x_resource_value is t or nil, |
| 3407 | VALUE does NOT specify a color. */ | 3405 | VALUE does NOT specify a color. */ |
| 3408 | boolean_value = face_boolean_x_resource_value (value, 0); | 3406 | boolean_value = face_boolean_x_resource_value (value, false); |
| 3409 | if (SYMBOLP (boolean_value)) | 3407 | if (SYMBOLP (boolean_value)) |
| 3410 | value = boolean_value; | 3408 | value = boolean_value; |
| 3411 | } | 3409 | } |
| @@ -3439,10 +3437,10 @@ x_update_menu_appearance (struct frame *f) | |||
| 3439 | char line[512]; | 3437 | char line[512]; |
| 3440 | char *buf = line; | 3438 | char *buf = line; |
| 3441 | ptrdiff_t bufsize = sizeof line; | 3439 | ptrdiff_t bufsize = sizeof line; |
| 3442 | Lisp_Object lface = lface_from_face_name (f, Qmenu, 1); | 3440 | Lisp_Object lface = lface_from_face_name (f, Qmenu, true); |
| 3443 | struct face *face = FACE_FROM_ID (f, MENU_FACE_ID); | 3441 | struct face *face = FACE_FROM_ID (f, MENU_FACE_ID); |
| 3444 | const char *myname = SSDATA (Vx_resource_name); | 3442 | const char *myname = SSDATA (Vx_resource_name); |
| 3445 | bool changed_p = 0; | 3443 | bool changed_p = false; |
| 3446 | #ifdef USE_MOTIF | 3444 | #ifdef USE_MOTIF |
| 3447 | const char *popup_path = "popup_menu"; | 3445 | const char *popup_path = "popup_menu"; |
| 3448 | #else | 3446 | #else |
| @@ -3458,7 +3456,7 @@ x_update_menu_appearance (struct frame *f) | |||
| 3458 | exprintf (&buf, &bufsize, line, -1, "%s.pane.menubar*foreground: %s", | 3456 | exprintf (&buf, &bufsize, line, -1, "%s.pane.menubar*foreground: %s", |
| 3459 | myname, SDATA (LFACE_FOREGROUND (lface))); | 3457 | myname, SDATA (LFACE_FOREGROUND (lface))); |
| 3460 | XrmPutLineResource (&rdb, line); | 3458 | XrmPutLineResource (&rdb, line); |
| 3461 | changed_p = 1; | 3459 | changed_p = true; |
| 3462 | } | 3460 | } |
| 3463 | 3461 | ||
| 3464 | if (STRINGP (LFACE_BACKGROUND (lface))) | 3462 | if (STRINGP (LFACE_BACKGROUND (lface))) |
| @@ -3471,7 +3469,7 @@ x_update_menu_appearance (struct frame *f) | |||
| 3471 | exprintf (&buf, &bufsize, line, -1, "%s.pane.menubar*background: %s", | 3469 | exprintf (&buf, &bufsize, line, -1, "%s.pane.menubar*background: %s", |
| 3472 | myname, SDATA (LFACE_BACKGROUND (lface))); | 3470 | myname, SDATA (LFACE_BACKGROUND (lface))); |
| 3473 | XrmPutLineResource (&rdb, line); | 3471 | XrmPutLineResource (&rdb, line); |
| 3474 | changed_p = 1; | 3472 | changed_p = true; |
| 3475 | } | 3473 | } |
| 3476 | 3474 | ||
| 3477 | if (face->font | 3475 | if (face->font |
| @@ -3514,7 +3512,7 @@ x_update_menu_appearance (struct frame *f) | |||
| 3514 | exprintf (&buf, &bufsize, line, -1, "%s.%s*font%s: %s", | 3512 | exprintf (&buf, &bufsize, line, -1, "%s.%s*font%s: %s", |
| 3515 | myname, popup_path, suffix, fontsetname); | 3513 | myname, popup_path, suffix, fontsetname); |
| 3516 | XrmPutLineResource (&rdb, line); | 3514 | XrmPutLineResource (&rdb, line); |
| 3517 | changed_p = 1; | 3515 | changed_p = true; |
| 3518 | if (fontsetname != SSDATA (xlfd)) | 3516 | if (fontsetname != SSDATA (xlfd)) |
| 3519 | xfree (fontsetname); | 3517 | xfree (fontsetname); |
| 3520 | } | 3518 | } |
| @@ -3581,7 +3579,7 @@ frames). If FRAME is omitted or nil, use the selected frame. */) | |||
| 3581 | (Lisp_Object symbol, Lisp_Object keyword, Lisp_Object frame) | 3579 | (Lisp_Object symbol, Lisp_Object keyword, Lisp_Object frame) |
| 3582 | { | 3580 | { |
| 3583 | struct frame *f = EQ (frame, Qt) ? NULL : decode_live_frame (frame); | 3581 | struct frame *f = EQ (frame, Qt) ? NULL : decode_live_frame (frame); |
| 3584 | Lisp_Object lface = lface_from_face_name (f, symbol, 1), value = Qnil; | 3582 | Lisp_Object lface = lface_from_face_name (f, symbol, true), value = Qnil; |
| 3585 | 3583 | ||
| 3586 | CHECK_SYMBOL (symbol); | 3584 | CHECK_SYMBOL (symbol); |
| 3587 | CHECK_SYMBOL (keyword); | 3585 | CHECK_SYMBOL (keyword); |
| @@ -3664,8 +3662,8 @@ Default face attributes override any local face attributes. */) | |||
| 3664 | struct frame *f = XFRAME (frame); | 3662 | struct frame *f = XFRAME (frame); |
| 3665 | 3663 | ||
| 3666 | CHECK_LIVE_FRAME (frame); | 3664 | CHECK_LIVE_FRAME (frame); |
| 3667 | global_lface = lface_from_face_name (NULL, face, 1); | 3665 | global_lface = lface_from_face_name (NULL, face, true); |
| 3668 | local_lface = lface_from_face_name (f, face, 0); | 3666 | local_lface = lface_from_face_name (f, face, false); |
| 3669 | if (NILP (local_lface)) | 3667 | if (NILP (local_lface)) |
| 3670 | local_lface = Finternal_make_lisp_face (face, frame); | 3668 | local_lface = Finternal_make_lisp_face (face, frame); |
| 3671 | 3669 | ||
| @@ -3754,7 +3752,7 @@ return the font name used for CHARACTER. */) | |||
| 3754 | if (EQ (frame, Qt)) | 3752 | if (EQ (frame, Qt)) |
| 3755 | { | 3753 | { |
| 3756 | Lisp_Object result = Qnil; | 3754 | Lisp_Object result = Qnil; |
| 3757 | Lisp_Object lface = lface_from_face_name (NULL, face, 1); | 3755 | Lisp_Object lface = lface_from_face_name (NULL, face, true); |
| 3758 | 3756 | ||
| 3759 | if (!UNSPECIFIEDP (LFACE_WEIGHT (lface)) | 3757 | if (!UNSPECIFIEDP (LFACE_WEIGHT (lface)) |
| 3760 | && !EQ (LFACE_WEIGHT (lface), Qnormal)) | 3758 | && !EQ (LFACE_WEIGHT (lface), Qnormal)) |
| @@ -3769,7 +3767,7 @@ return the font name used for CHARACTER. */) | |||
| 3769 | else | 3767 | else |
| 3770 | { | 3768 | { |
| 3771 | struct frame *f = decode_live_frame (frame); | 3769 | struct frame *f = decode_live_frame (frame); |
| 3772 | int face_id = lookup_named_face (f, face, 1); | 3770 | int face_id = lookup_named_face (f, face, true); |
| 3773 | struct face *fface = FACE_FROM_ID (f, face_id); | 3771 | struct face *fface = FACE_FROM_ID (f, face_id); |
| 3774 | 3772 | ||
| 3775 | if (! fface) | 3773 | if (! fface) |
| @@ -3794,7 +3792,7 @@ return the font name used for CHARACTER. */) | |||
| 3794 | } | 3792 | } |
| 3795 | 3793 | ||
| 3796 | 3794 | ||
| 3797 | /* Compare face-attribute values v1 and v2 for equality. Value is non-zero if | 3795 | /* Compare face-attribute values v1 and v2 for equality. Value is true if |
| 3798 | all attributes are `equal'. Tries to be fast because this function | 3796 | all attributes are `equal'. Tries to be fast because this function |
| 3799 | is called quite often. */ | 3797 | is called quite often. */ |
| 3800 | 3798 | ||
| @@ -3804,22 +3802,22 @@ face_attr_equal_p (Lisp_Object v1, Lisp_Object v2) | |||
| 3804 | /* Type can differ, e.g. when one attribute is unspecified, i.e. nil, | 3802 | /* Type can differ, e.g. when one attribute is unspecified, i.e. nil, |
| 3805 | and the other is specified. */ | 3803 | and the other is specified. */ |
| 3806 | if (XTYPE (v1) != XTYPE (v2)) | 3804 | if (XTYPE (v1) != XTYPE (v2)) |
| 3807 | return 0; | 3805 | return false; |
| 3808 | 3806 | ||
| 3809 | if (EQ (v1, v2)) | 3807 | if (EQ (v1, v2)) |
| 3810 | return 1; | 3808 | return true; |
| 3811 | 3809 | ||
| 3812 | switch (XTYPE (v1)) | 3810 | switch (XTYPE (v1)) |
| 3813 | { | 3811 | { |
| 3814 | case Lisp_String: | 3812 | case Lisp_String: |
| 3815 | if (SBYTES (v1) != SBYTES (v2)) | 3813 | if (SBYTES (v1) != SBYTES (v2)) |
| 3816 | return 0; | 3814 | return false; |
| 3817 | 3815 | ||
| 3818 | return memcmp (SDATA (v1), SDATA (v2), SBYTES (v1)) == 0; | 3816 | return memcmp (SDATA (v1), SDATA (v2), SBYTES (v1)) == 0; |
| 3819 | 3817 | ||
| 3820 | case_Lisp_Int: | 3818 | case_Lisp_Int: |
| 3821 | case Lisp_Symbol: | 3819 | case Lisp_Symbol: |
| 3822 | return 0; | 3820 | return false; |
| 3823 | 3821 | ||
| 3824 | default: | 3822 | default: |
| 3825 | return !NILP (Fequal (v1, v2)); | 3823 | return !NILP (Fequal (v1, v2)); |
| @@ -3827,7 +3825,7 @@ face_attr_equal_p (Lisp_Object v1, Lisp_Object v2) | |||
| 3827 | } | 3825 | } |
| 3828 | 3826 | ||
| 3829 | 3827 | ||
| 3830 | /* Compare face vectors V1 and V2 for equality. Value is non-zero if | 3828 | /* Compare face vectors V1 and V2 for equality. Value is true if |
| 3831 | all attributes are `equal'. Tries to be fast because this function | 3829 | all attributes are `equal'. Tries to be fast because this function |
| 3832 | is called quite often. */ | 3830 | is called quite often. */ |
| 3833 | 3831 | ||
| @@ -3835,7 +3833,7 @@ static bool | |||
| 3835 | lface_equal_p (Lisp_Object *v1, Lisp_Object *v2) | 3833 | lface_equal_p (Lisp_Object *v1, Lisp_Object *v2) |
| 3836 | { | 3834 | { |
| 3837 | int i; | 3835 | int i; |
| 3838 | bool equal_p = 1; | 3836 | bool equal_p = true; |
| 3839 | 3837 | ||
| 3840 | for (i = 1; i < LFACE_VECTOR_SIZE && equal_p; ++i) | 3838 | for (i = 1; i < LFACE_VECTOR_SIZE && equal_p; ++i) |
| 3841 | equal_p = face_attr_equal_p (v1[i], v2[i]); | 3839 | equal_p = face_attr_equal_p (v1[i], v2[i]); |
| @@ -3852,7 +3850,7 @@ If FRAME is t, report on the defaults for FACE1 and FACE2 (for new frames). | |||
| 3852 | If FRAME is omitted or nil, use the selected frame. */) | 3850 | If FRAME is omitted or nil, use the selected frame. */) |
| 3853 | (Lisp_Object face1, Lisp_Object face2, Lisp_Object frame) | 3851 | (Lisp_Object face1, Lisp_Object face2, Lisp_Object frame) |
| 3854 | { | 3852 | { |
| 3855 | int equal_p; | 3853 | bool equal_p; |
| 3856 | struct frame *f; | 3854 | struct frame *f; |
| 3857 | Lisp_Object lface1, lface2; | 3855 | Lisp_Object lface1, lface2; |
| 3858 | 3856 | ||
| @@ -3862,8 +3860,8 @@ If FRAME is omitted or nil, use the selected frame. */) | |||
| 3862 | Emacs. That frame is not an X frame. */ | 3860 | Emacs. That frame is not an X frame. */ |
| 3863 | f = EQ (frame, Qt) ? NULL : decode_live_frame (frame); | 3861 | f = EQ (frame, Qt) ? NULL : decode_live_frame (frame); |
| 3864 | 3862 | ||
| 3865 | lface1 = lface_from_face_name (f, face1, 1); | 3863 | lface1 = lface_from_face_name (f, face1, true); |
| 3866 | lface2 = lface_from_face_name (f, face2, 1); | 3864 | lface2 = lface_from_face_name (f, face2, true); |
| 3867 | equal_p = lface_equal_p (XVECTOR (lface1)->contents, | 3865 | equal_p = lface_equal_p (XVECTOR (lface1)->contents, |
| 3868 | XVECTOR (lface2)->contents); | 3866 | XVECTOR (lface2)->contents); |
| 3869 | return equal_p ? Qt : Qnil; | 3867 | return equal_p ? Qt : Qnil; |
| @@ -3879,7 +3877,7 @@ If FRAME is omitted or nil, use the selected frame. */) | |||
| 3879 | (Lisp_Object face, Lisp_Object frame) | 3877 | (Lisp_Object face, Lisp_Object frame) |
| 3880 | { | 3878 | { |
| 3881 | struct frame *f = EQ (frame, Qt) ? NULL : decode_live_frame (frame); | 3879 | struct frame *f = EQ (frame, Qt) ? NULL : decode_live_frame (frame); |
| 3882 | Lisp_Object lface = lface_from_face_name (f, face, 1); | 3880 | Lisp_Object lface = lface_from_face_name (f, face, true); |
| 3883 | int i; | 3881 | int i; |
| 3884 | 3882 | ||
| 3885 | for (i = 1; i < LFACE_VECTOR_SIZE; ++i) | 3883 | for (i = 1; i < LFACE_VECTOR_SIZE; ++i) |
| @@ -3932,12 +3930,12 @@ lface_hash (Lisp_Object *v) | |||
| 3932 | 3930 | ||
| 3933 | #ifdef HAVE_WINDOW_SYSTEM | 3931 | #ifdef HAVE_WINDOW_SYSTEM |
| 3934 | 3932 | ||
| 3935 | /* Return non-zero if LFACE1 and LFACE2 specify the same font (without | 3933 | /* Return true if LFACE1 and LFACE2 specify the same font (without |
| 3936 | considering charsets/registries). They do if they specify the same | 3934 | considering charsets/registries). They do if they specify the same |
| 3937 | family, point size, weight, width, slant, and font. Both | 3935 | family, point size, weight, width, slant, and font. Both |
| 3938 | LFACE1 and LFACE2 must be fully-specified. */ | 3936 | LFACE1 and LFACE2 must be fully-specified. */ |
| 3939 | 3937 | ||
| 3940 | static int | 3938 | static bool |
| 3941 | lface_same_font_attributes_p (Lisp_Object *lface1, Lisp_Object *lface2) | 3939 | lface_same_font_attributes_p (Lisp_Object *lface1, Lisp_Object *lface2) |
| 3942 | { | 3940 | { |
| 3943 | eassert (lface_fully_specified_p (lface1) | 3941 | eassert (lface_fully_specified_p (lface1) |
| @@ -4094,10 +4092,12 @@ If FRAME is unspecified or nil, the current frame is used. */) | |||
| 4094 | XColor cdef1, cdef2; | 4092 | XColor cdef1, cdef2; |
| 4095 | 4093 | ||
| 4096 | if (!(CONSP (color1) && parse_rgb_list (color1, &cdef1)) | 4094 | if (!(CONSP (color1) && parse_rgb_list (color1, &cdef1)) |
| 4097 | && !(STRINGP (color1) && defined_color (f, SSDATA (color1), &cdef1, 0))) | 4095 | && !(STRINGP (color1) |
| 4096 | && defined_color (f, SSDATA (color1), &cdef1, false))) | ||
| 4098 | signal_error ("Invalid color", color1); | 4097 | signal_error ("Invalid color", color1); |
| 4099 | if (!(CONSP (color2) && parse_rgb_list (color2, &cdef2)) | 4098 | if (!(CONSP (color2) && parse_rgb_list (color2, &cdef2)) |
| 4100 | && !(STRINGP (color2) && defined_color (f, SSDATA (color2), &cdef2, 0))) | 4099 | && !(STRINGP (color2) |
| 4100 | && defined_color (f, SSDATA (color2), &cdef2, false))) | ||
| 4101 | signal_error ("Invalid color", color2); | 4101 | signal_error ("Invalid color", color2); |
| 4102 | 4102 | ||
| 4103 | return make_number (color_distance (&cdef1, &cdef2)); | 4103 | return make_number (color_distance (&cdef1, &cdef2)); |
| @@ -4413,7 +4413,7 @@ face_for_font (struct frame *f, Lisp_Object font_object, struct face *base_face) | |||
| 4413 | face isn't realized and cannot be realized. */ | 4413 | face isn't realized and cannot be realized. */ |
| 4414 | 4414 | ||
| 4415 | int | 4415 | int |
| 4416 | lookup_named_face (struct frame *f, Lisp_Object symbol, int signal_p) | 4416 | lookup_named_face (struct frame *f, Lisp_Object symbol, bool signal_p) |
| 4417 | { | 4417 | { |
| 4418 | Lisp_Object attrs[LFACE_VECTOR_SIZE]; | 4418 | Lisp_Object attrs[LFACE_VECTOR_SIZE]; |
| 4419 | Lisp_Object symbol_attrs[LFACE_VECTOR_SIZE]; | 4419 | Lisp_Object symbol_attrs[LFACE_VECTOR_SIZE]; |
| @@ -4480,7 +4480,7 @@ lookup_basic_face (struct frame *f, int face_id) | |||
| 4480 | 4480 | ||
| 4481 | /* If there is a remapping entry, lookup the face using NAME, which will | 4481 | /* If there is a remapping entry, lookup the face using NAME, which will |
| 4482 | handle the remapping too. */ | 4482 | handle the remapping too. */ |
| 4483 | remapped_face_id = lookup_named_face (f, name, 0); | 4483 | remapped_face_id = lookup_named_face (f, name, false); |
| 4484 | if (remapped_face_id < 0) | 4484 | if (remapped_face_id < 0) |
| 4485 | return face_id; /* Give up. */ | 4485 | return face_id; /* Give up. */ |
| 4486 | 4486 | ||
| @@ -4582,7 +4582,7 @@ face_with_height (struct frame *f, int face_id, int height) | |||
| 4582 | 4582 | ||
| 4583 | int | 4583 | int |
| 4584 | lookup_derived_face (struct frame *f, Lisp_Object symbol, int face_id, | 4584 | lookup_derived_face (struct frame *f, Lisp_Object symbol, int face_id, |
| 4585 | int signal_p) | 4585 | bool signal_p) |
| 4586 | { | 4586 | { |
| 4587 | Lisp_Object attrs[LFACE_VECTOR_SIZE]; | 4587 | Lisp_Object attrs[LFACE_VECTOR_SIZE]; |
| 4588 | Lisp_Object symbol_attrs[LFACE_VECTOR_SIZE]; | 4588 | Lisp_Object symbol_attrs[LFACE_VECTOR_SIZE]; |
| @@ -4608,7 +4608,7 @@ DEFUN ("face-attributes-as-vector", Fface_attributes_as_vector, | |||
| 4608 | lface = Fmake_vector (make_number (LFACE_VECTOR_SIZE), | 4608 | lface = Fmake_vector (make_number (LFACE_VECTOR_SIZE), |
| 4609 | Qunspecified); | 4609 | Qunspecified); |
| 4610 | merge_face_ref (XFRAME (selected_frame), plist, XVECTOR (lface)->contents, | 4610 | merge_face_ref (XFRAME (selected_frame), plist, XVECTOR (lface)->contents, |
| 4611 | 1, 0); | 4611 | true, 0); |
| 4612 | return lface; | 4612 | return lface; |
| 4613 | } | 4613 | } |
| 4614 | 4614 | ||
| @@ -4673,7 +4673,7 @@ x_supports_face_attributes_p (struct frame *f, | |||
| 4673 | || (!UNSPECIFIEDP (attrs[LFACE_BOX_INDEX]) | 4673 | || (!UNSPECIFIEDP (attrs[LFACE_BOX_INDEX]) |
| 4674 | && face_attr_equal_p (attrs[LFACE_BOX_INDEX], | 4674 | && face_attr_equal_p (attrs[LFACE_BOX_INDEX], |
| 4675 | def_attrs[LFACE_BOX_INDEX]))) | 4675 | def_attrs[LFACE_BOX_INDEX]))) |
| 4676 | return 0; | 4676 | return false; |
| 4677 | 4677 | ||
| 4678 | /* Check font-related attributes, as those are the most commonly | 4678 | /* Check font-related attributes, as those are the most commonly |
| 4679 | "unsupported" on a window-system (because of missing fonts). */ | 4679 | "unsupported" on a window-system (because of missing fonts). */ |
| @@ -4703,7 +4703,7 @@ x_supports_face_attributes_p (struct frame *f, | |||
| 4703 | supported. */ | 4703 | supported. */ |
| 4704 | if (face->font == def_face->font | 4704 | if (face->font == def_face->font |
| 4705 | || ! face->font) | 4705 | || ! face->font) |
| 4706 | return 0; | 4706 | return false; |
| 4707 | for (i = FONT_TYPE_INDEX; i <= FONT_SIZE_INDEX; i++) | 4707 | for (i = FONT_TYPE_INDEX; i <= FONT_SIZE_INDEX; i++) |
| 4708 | if (! EQ (face->font->props[i], def_face->font->props[i])) | 4708 | if (! EQ (face->font->props[i], def_face->font->props[i])) |
| 4709 | { | 4709 | { |
| @@ -4711,18 +4711,18 @@ x_supports_face_attributes_p (struct frame *f, | |||
| 4711 | 4711 | ||
| 4712 | if (i < FONT_FOUNDRY_INDEX || i > FONT_REGISTRY_INDEX | 4712 | if (i < FONT_FOUNDRY_INDEX || i > FONT_REGISTRY_INDEX |
| 4713 | || face->font->driver->case_sensitive) | 4713 | || face->font->driver->case_sensitive) |
| 4714 | return 1; | 4714 | return true; |
| 4715 | s1 = SYMBOL_NAME (face->font->props[i]); | 4715 | s1 = SYMBOL_NAME (face->font->props[i]); |
| 4716 | s2 = SYMBOL_NAME (def_face->font->props[i]); | 4716 | s2 = SYMBOL_NAME (def_face->font->props[i]); |
| 4717 | if (! EQ (Fcompare_strings (s1, make_number (0), Qnil, | 4717 | if (! EQ (Fcompare_strings (s1, make_number (0), Qnil, |
| 4718 | s2, make_number (0), Qnil, Qt), Qt)) | 4718 | s2, make_number (0), Qnil, Qt), Qt)) |
| 4719 | return 1; | 4719 | return true; |
| 4720 | } | 4720 | } |
| 4721 | return 0; | 4721 | return false; |
| 4722 | } | 4722 | } |
| 4723 | 4723 | ||
| 4724 | /* Everything checks out, this face is supported. */ | 4724 | /* Everything checks out, this face is supported. */ |
| 4725 | return 1; | 4725 | return true; |
| 4726 | } | 4726 | } |
| 4727 | 4727 | ||
| 4728 | #endif /* HAVE_WINDOW_SYSTEM */ | 4728 | #endif /* HAVE_WINDOW_SYSTEM */ |
| @@ -4771,7 +4771,7 @@ tty_supports_face_attributes_p (struct frame *f, | |||
| 4771 | || !UNSPECIFIEDP (attrs[LFACE_OVERLINE_INDEX]) | 4771 | || !UNSPECIFIEDP (attrs[LFACE_OVERLINE_INDEX]) |
| 4772 | || !UNSPECIFIEDP (attrs[LFACE_STRIKE_THROUGH_INDEX]) | 4772 | || !UNSPECIFIEDP (attrs[LFACE_STRIKE_THROUGH_INDEX]) |
| 4773 | || !UNSPECIFIEDP (attrs[LFACE_BOX_INDEX])) | 4773 | || !UNSPECIFIEDP (attrs[LFACE_BOX_INDEX])) |
| 4774 | return 0; | 4774 | return false; |
| 4775 | 4775 | ||
| 4776 | /* Test for terminal `capabilities' (non-color character attributes). */ | 4776 | /* Test for terminal `capabilities' (non-color character attributes). */ |
| 4777 | 4777 | ||
| @@ -4785,17 +4785,17 @@ tty_supports_face_attributes_p (struct frame *f, | |||
| 4785 | if (weight > 100) | 4785 | if (weight > 100) |
| 4786 | { | 4786 | { |
| 4787 | if (def_weight > 100) | 4787 | if (def_weight > 100) |
| 4788 | return 0; /* same as default */ | 4788 | return false; /* same as default */ |
| 4789 | test_caps = TTY_CAP_BOLD; | 4789 | test_caps = TTY_CAP_BOLD; |
| 4790 | } | 4790 | } |
| 4791 | else if (weight < 100) | 4791 | else if (weight < 100) |
| 4792 | { | 4792 | { |
| 4793 | if (def_weight < 100) | 4793 | if (def_weight < 100) |
| 4794 | return 0; /* same as default */ | 4794 | return false; /* same as default */ |
| 4795 | test_caps = TTY_CAP_DIM; | 4795 | test_caps = TTY_CAP_DIM; |
| 4796 | } | 4796 | } |
| 4797 | else if (def_weight == 100) | 4797 | else if (def_weight == 100) |
| 4798 | return 0; /* same as default */ | 4798 | return false; /* same as default */ |
| 4799 | } | 4799 | } |
| 4800 | 4800 | ||
| 4801 | /* font slant */ | 4801 | /* font slant */ |
| @@ -4805,7 +4805,7 @@ tty_supports_face_attributes_p (struct frame *f, | |||
| 4805 | { | 4805 | { |
| 4806 | int def_slant = FONT_SLANT_NAME_NUMERIC (def_attrs[LFACE_SLANT_INDEX]); | 4806 | int def_slant = FONT_SLANT_NAME_NUMERIC (def_attrs[LFACE_SLANT_INDEX]); |
| 4807 | if (slant == 100 || slant == def_slant) | 4807 | if (slant == 100 || slant == def_slant) |
| 4808 | return 0; /* same as default */ | 4808 | return false; /* same as default */ |
| 4809 | else | 4809 | else |
| 4810 | test_caps |= TTY_CAP_ITALIC; | 4810 | test_caps |= TTY_CAP_ITALIC; |
| 4811 | } | 4811 | } |
| @@ -4815,11 +4815,11 @@ tty_supports_face_attributes_p (struct frame *f, | |||
| 4815 | if (!UNSPECIFIEDP (val)) | 4815 | if (!UNSPECIFIEDP (val)) |
| 4816 | { | 4816 | { |
| 4817 | if (STRINGP (val)) | 4817 | if (STRINGP (val)) |
| 4818 | return 0; /* ttys can't use colored underlines */ | 4818 | return false; /* ttys can't use colored underlines */ |
| 4819 | else if (EQ (CAR_SAFE (val), QCstyle) && EQ (CAR_SAFE (CDR_SAFE (val)), Qwave)) | 4819 | else if (EQ (CAR_SAFE (val), QCstyle) && EQ (CAR_SAFE (CDR_SAFE (val)), Qwave)) |
| 4820 | return 0; /* ttys can't use wave underlines */ | 4820 | return false; /* ttys can't use wave underlines */ |
| 4821 | else if (face_attr_equal_p (val, def_attrs[LFACE_UNDERLINE_INDEX])) | 4821 | else if (face_attr_equal_p (val, def_attrs[LFACE_UNDERLINE_INDEX])) |
| 4822 | return 0; /* same as default */ | 4822 | return false; /* same as default */ |
| 4823 | else | 4823 | else |
| 4824 | test_caps |= TTY_CAP_UNDERLINE; | 4824 | test_caps |= TTY_CAP_UNDERLINE; |
| 4825 | } | 4825 | } |
| @@ -4829,7 +4829,7 @@ tty_supports_face_attributes_p (struct frame *f, | |||
| 4829 | if (!UNSPECIFIEDP (val)) | 4829 | if (!UNSPECIFIEDP (val)) |
| 4830 | { | 4830 | { |
| 4831 | if (face_attr_equal_p (val, def_attrs[LFACE_INVERSE_INDEX])) | 4831 | if (face_attr_equal_p (val, def_attrs[LFACE_INVERSE_INDEX])) |
| 4832 | return 0; /* same as default */ | 4832 | return false; /* same as default */ |
| 4833 | else | 4833 | else |
| 4834 | test_caps |= TTY_CAP_INVERSE; | 4834 | test_caps |= TTY_CAP_INVERSE; |
| 4835 | } | 4835 | } |
| @@ -4844,12 +4844,12 @@ tty_supports_face_attributes_p (struct frame *f, | |||
| 4844 | Lisp_Object def_fg = def_attrs[LFACE_FOREGROUND_INDEX]; | 4844 | Lisp_Object def_fg = def_attrs[LFACE_FOREGROUND_INDEX]; |
| 4845 | 4845 | ||
| 4846 | if (face_attr_equal_p (fg, def_fg)) | 4846 | if (face_attr_equal_p (fg, def_fg)) |
| 4847 | return 0; /* same as default */ | 4847 | return false; /* same as default */ |
| 4848 | else if (! tty_lookup_color (f, fg, &fg_tty_color, &fg_std_color)) | 4848 | else if (! tty_lookup_color (f, fg, &fg_tty_color, &fg_std_color)) |
| 4849 | return 0; /* not a valid color */ | 4849 | return false; /* not a valid color */ |
| 4850 | else if (color_distance (&fg_tty_color, &fg_std_color) | 4850 | else if (color_distance (&fg_tty_color, &fg_std_color) |
| 4851 | > TTY_SAME_COLOR_THRESHOLD) | 4851 | > TTY_SAME_COLOR_THRESHOLD) |
| 4852 | return 0; /* displayed color is too different */ | 4852 | return false; /* displayed color is too different */ |
| 4853 | else | 4853 | else |
| 4854 | /* Make sure the color is really different than the default. */ | 4854 | /* Make sure the color is really different than the default. */ |
| 4855 | { | 4855 | { |
| @@ -4857,7 +4857,7 @@ tty_supports_face_attributes_p (struct frame *f, | |||
| 4857 | if (tty_lookup_color (f, def_fg, &def_fg_color, 0) | 4857 | if (tty_lookup_color (f, def_fg, &def_fg_color, 0) |
| 4858 | && (color_distance (&fg_tty_color, &def_fg_color) | 4858 | && (color_distance (&fg_tty_color, &def_fg_color) |
| 4859 | <= TTY_SAME_COLOR_THRESHOLD)) | 4859 | <= TTY_SAME_COLOR_THRESHOLD)) |
| 4860 | return 0; | 4860 | return false; |
| 4861 | } | 4861 | } |
| 4862 | } | 4862 | } |
| 4863 | 4863 | ||
| @@ -4868,12 +4868,12 @@ tty_supports_face_attributes_p (struct frame *f, | |||
| 4868 | Lisp_Object def_bg = def_attrs[LFACE_BACKGROUND_INDEX]; | 4868 | Lisp_Object def_bg = def_attrs[LFACE_BACKGROUND_INDEX]; |
| 4869 | 4869 | ||
| 4870 | if (face_attr_equal_p (bg, def_bg)) | 4870 | if (face_attr_equal_p (bg, def_bg)) |
| 4871 | return 0; /* same as default */ | 4871 | return false; /* same as default */ |
| 4872 | else if (! tty_lookup_color (f, bg, &bg_tty_color, &bg_std_color)) | 4872 | else if (! tty_lookup_color (f, bg, &bg_tty_color, &bg_std_color)) |
| 4873 | return 0; /* not a valid color */ | 4873 | return false; /* not a valid color */ |
| 4874 | else if (color_distance (&bg_tty_color, &bg_std_color) | 4874 | else if (color_distance (&bg_tty_color, &bg_std_color) |
| 4875 | > TTY_SAME_COLOR_THRESHOLD) | 4875 | > TTY_SAME_COLOR_THRESHOLD) |
| 4876 | return 0; /* displayed color is too different */ | 4876 | return false; /* displayed color is too different */ |
| 4877 | else | 4877 | else |
| 4878 | /* Make sure the color is really different than the default. */ | 4878 | /* Make sure the color is really different than the default. */ |
| 4879 | { | 4879 | { |
| @@ -4881,7 +4881,7 @@ tty_supports_face_attributes_p (struct frame *f, | |||
| 4881 | if (tty_lookup_color (f, def_bg, &def_bg_color, 0) | 4881 | if (tty_lookup_color (f, def_bg, &def_bg_color, 0) |
| 4882 | && (color_distance (&bg_tty_color, &def_bg_color) | 4882 | && (color_distance (&bg_tty_color, &def_bg_color) |
| 4883 | <= TTY_SAME_COLOR_THRESHOLD)) | 4883 | <= TTY_SAME_COLOR_THRESHOLD)) |
| 4884 | return 0; | 4884 | return false; |
| 4885 | } | 4885 | } |
| 4886 | } | 4886 | } |
| 4887 | 4887 | ||
| @@ -4896,7 +4896,7 @@ tty_supports_face_attributes_p (struct frame *f, | |||
| 4896 | - color_distance (&fg_tty_color, &bg_tty_color)); | 4896 | - color_distance (&fg_tty_color, &bg_tty_color)); |
| 4897 | if (delta_delta > TTY_SAME_COLOR_THRESHOLD | 4897 | if (delta_delta > TTY_SAME_COLOR_THRESHOLD |
| 4898 | || delta_delta < -TTY_SAME_COLOR_THRESHOLD) | 4898 | || delta_delta < -TTY_SAME_COLOR_THRESHOLD) |
| 4899 | return 0; | 4899 | return false; |
| 4900 | } | 4900 | } |
| 4901 | 4901 | ||
| 4902 | 4902 | ||
| @@ -4927,7 +4927,7 @@ satisfied by the tty display code's automatic substitution of a `dim' | |||
| 4927 | face for italic. */) | 4927 | face for italic. */) |
| 4928 | (Lisp_Object attributes, Lisp_Object display) | 4928 | (Lisp_Object attributes, Lisp_Object display) |
| 4929 | { | 4929 | { |
| 4930 | bool supports = 0; | 4930 | bool supports = false; |
| 4931 | int i; | 4931 | int i; |
| 4932 | Lisp_Object frame; | 4932 | Lisp_Object frame; |
| 4933 | struct frame *f; | 4933 | struct frame *f; |
| @@ -4962,7 +4962,7 @@ face for italic. */) | |||
| 4962 | 4962 | ||
| 4963 | for (i = 0; i < LFACE_VECTOR_SIZE; i++) | 4963 | for (i = 0; i < LFACE_VECTOR_SIZE; i++) |
| 4964 | attrs[i] = Qunspecified; | 4964 | attrs[i] = Qunspecified; |
| 4965 | merge_face_ref (f, attributes, attrs, 1, 0); | 4965 | merge_face_ref (f, attributes, attrs, true, 0); |
| 4966 | 4966 | ||
| 4967 | def_face = FACE_FROM_ID (f, DEFAULT_FACE_ID); | 4967 | def_face = FACE_FROM_ID (f, DEFAULT_FACE_ID); |
| 4968 | if (def_face == NULL) | 4968 | if (def_face == NULL) |
| @@ -5140,7 +5140,7 @@ face_fontset (Lisp_Object attrs[LFACE_VECTOR_SIZE]) | |||
| 5140 | static bool | 5140 | static bool |
| 5141 | realize_basic_faces (struct frame *f) | 5141 | realize_basic_faces (struct frame *f) |
| 5142 | { | 5142 | { |
| 5143 | bool success_p = 0; | 5143 | bool success_p = false; |
| 5144 | ptrdiff_t count = SPECPDL_INDEX (); | 5144 | ptrdiff_t count = SPECPDL_INDEX (); |
| 5145 | 5145 | ||
| 5146 | /* Block input here so that we won't be surprised by an X expose | 5146 | /* Block input here so that we won't be surprised by an X expose |
| @@ -5170,14 +5170,14 @@ realize_basic_faces (struct frame *f) | |||
| 5170 | /* Reflect changes in the `menu' face in menu bars. */ | 5170 | /* Reflect changes in the `menu' face in menu bars. */ |
| 5171 | if (FRAME_FACE_CACHE (f)->menu_face_changed_p) | 5171 | if (FRAME_FACE_CACHE (f)->menu_face_changed_p) |
| 5172 | { | 5172 | { |
| 5173 | FRAME_FACE_CACHE (f)->menu_face_changed_p = 0; | 5173 | FRAME_FACE_CACHE (f)->menu_face_changed_p = false; |
| 5174 | #ifdef USE_X_TOOLKIT | 5174 | #ifdef USE_X_TOOLKIT |
| 5175 | if (FRAME_WINDOW_P (f)) | 5175 | if (FRAME_WINDOW_P (f)) |
| 5176 | x_update_menu_appearance (f); | 5176 | x_update_menu_appearance (f); |
| 5177 | #endif | 5177 | #endif |
| 5178 | } | 5178 | } |
| 5179 | 5179 | ||
| 5180 | success_p = 1; | 5180 | success_p = true; |
| 5181 | } | 5181 | } |
| 5182 | 5182 | ||
| 5183 | unbind_to (count, Qnil); | 5183 | unbind_to (count, Qnil); |
| @@ -5199,7 +5199,7 @@ realize_default_face (struct frame *f) | |||
| 5199 | struct face *face; | 5199 | struct face *face; |
| 5200 | 5200 | ||
| 5201 | /* If the `default' face is not yet known, create it. */ | 5201 | /* If the `default' face is not yet known, create it. */ |
| 5202 | lface = lface_from_face_name (f, Qdefault, 0); | 5202 | lface = lface_from_face_name (f, Qdefault, false); |
| 5203 | if (NILP (lface)) | 5203 | if (NILP (lface)) |
| 5204 | { | 5204 | { |
| 5205 | Lisp_Object frame; | 5205 | Lisp_Object frame; |
| @@ -5215,7 +5215,7 @@ realize_default_face (struct frame *f) | |||
| 5215 | XSETFONT (font_object, FRAME_FONT (f)); | 5215 | XSETFONT (font_object, FRAME_FONT (f)); |
| 5216 | set_lface_from_font (f, lface, font_object, f->default_face_done_p); | 5216 | set_lface_from_font (f, lface, font_object, f->default_face_done_p); |
| 5217 | ASET (lface, LFACE_FONTSET_INDEX, fontset_name (FRAME_FONTSET (f))); | 5217 | ASET (lface, LFACE_FONTSET_INDEX, fontset_name (FRAME_FONTSET (f))); |
| 5218 | f->default_face_done_p = 1; | 5218 | f->default_face_done_p = true; |
| 5219 | } | 5219 | } |
| 5220 | #endif /* HAVE_WINDOW_SYSTEM */ | 5220 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 5221 | 5221 | ||
| @@ -5257,7 +5257,7 @@ realize_default_face (struct frame *f) | |||
| 5257 | if (CONSP (color) && STRINGP (XCDR (color))) | 5257 | if (CONSP (color) && STRINGP (XCDR (color))) |
| 5258 | ASET (lface, LFACE_FOREGROUND_INDEX, XCDR (color)); | 5258 | ASET (lface, LFACE_FOREGROUND_INDEX, XCDR (color)); |
| 5259 | else if (FRAME_WINDOW_P (f)) | 5259 | else if (FRAME_WINDOW_P (f)) |
| 5260 | return 0; | 5260 | return false; |
| 5261 | else if (FRAME_INITIAL_P (f) || FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)) | 5261 | else if (FRAME_INITIAL_P (f) || FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)) |
| 5262 | ASET (lface, LFACE_FOREGROUND_INDEX, build_string (unspecified_fg)); | 5262 | ASET (lface, LFACE_FOREGROUND_INDEX, build_string (unspecified_fg)); |
| 5263 | else | 5263 | else |
| @@ -5272,7 +5272,7 @@ realize_default_face (struct frame *f) | |||
| 5272 | if (CONSP (color) && STRINGP (XCDR (color))) | 5272 | if (CONSP (color) && STRINGP (XCDR (color))) |
| 5273 | ASET (lface, LFACE_BACKGROUND_INDEX, XCDR (color)); | 5273 | ASET (lface, LFACE_BACKGROUND_INDEX, XCDR (color)); |
| 5274 | else if (FRAME_WINDOW_P (f)) | 5274 | else if (FRAME_WINDOW_P (f)) |
| 5275 | return 0; | 5275 | return false; |
| 5276 | else if (FRAME_INITIAL_P (f) || FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)) | 5276 | else if (FRAME_INITIAL_P (f) || FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)) |
| 5277 | ASET (lface, LFACE_BACKGROUND_INDEX, build_string (unspecified_bg)); | 5277 | ASET (lface, LFACE_BACKGROUND_INDEX, build_string (unspecified_bg)); |
| 5278 | else | 5278 | else |
| @@ -5295,7 +5295,7 @@ realize_default_face (struct frame *f) | |||
| 5295 | /* This can happen when making a frame on a display that does | 5295 | /* This can happen when making a frame on a display that does |
| 5296 | not support the default font. */ | 5296 | not support the default font. */ |
| 5297 | if (!face->font) | 5297 | if (!face->font) |
| 5298 | return 0; | 5298 | return false; |
| 5299 | 5299 | ||
| 5300 | /* Otherwise, the font specified for the frame was not | 5300 | /* Otherwise, the font specified for the frame was not |
| 5301 | acceptable as a font for the default face (perhaps because | 5301 | acceptable as a font for the default face (perhaps because |
| @@ -5305,7 +5305,7 @@ realize_default_face (struct frame *f) | |||
| 5305 | } | 5305 | } |
| 5306 | #endif /* HAVE_X_WINDOWS */ | 5306 | #endif /* HAVE_X_WINDOWS */ |
| 5307 | #endif /* HAVE_WINDOW_SYSTEM */ | 5307 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 5308 | return 1; | 5308 | return true; |
| 5309 | } | 5309 | } |
| 5310 | 5310 | ||
| 5311 | 5311 | ||
| @@ -5317,12 +5317,12 @@ static void | |||
| 5317 | realize_named_face (struct frame *f, Lisp_Object symbol, int id) | 5317 | realize_named_face (struct frame *f, Lisp_Object symbol, int id) |
| 5318 | { | 5318 | { |
| 5319 | struct face_cache *c = FRAME_FACE_CACHE (f); | 5319 | struct face_cache *c = FRAME_FACE_CACHE (f); |
| 5320 | Lisp_Object lface = lface_from_face_name (f, symbol, 0); | 5320 | Lisp_Object lface = lface_from_face_name (f, symbol, false); |
| 5321 | Lisp_Object attrs[LFACE_VECTOR_SIZE]; | 5321 | Lisp_Object attrs[LFACE_VECTOR_SIZE]; |
| 5322 | Lisp_Object symbol_attrs[LFACE_VECTOR_SIZE]; | 5322 | Lisp_Object symbol_attrs[LFACE_VECTOR_SIZE]; |
| 5323 | 5323 | ||
| 5324 | /* The default face must exist and be fully specified. */ | 5324 | /* The default face must exist and be fully specified. */ |
| 5325 | get_lface_attributes_no_remap (f, Qdefault, attrs, 1); | 5325 | get_lface_attributes_no_remap (f, Qdefault, attrs, true); |
| 5326 | check_lface_attrs (attrs); | 5326 | check_lface_attrs (attrs); |
| 5327 | eassert (lface_fully_specified_p (attrs)); | 5327 | eassert (lface_fully_specified_p (attrs)); |
| 5328 | 5328 | ||
| @@ -5335,7 +5335,7 @@ realize_named_face (struct frame *f, Lisp_Object symbol, int id) | |||
| 5335 | } | 5335 | } |
| 5336 | 5336 | ||
| 5337 | /* Merge SYMBOL's face with the default face. */ | 5337 | /* Merge SYMBOL's face with the default face. */ |
| 5338 | get_lface_attributes_no_remap (f, symbol, symbol_attrs, 1); | 5338 | get_lface_attributes_no_remap (f, symbol, symbol_attrs, true); |
| 5339 | merge_face_vectors (f, symbol_attrs, attrs, 0); | 5339 | merge_face_vectors (f, symbol_attrs, attrs, 0); |
| 5340 | 5340 | ||
| 5341 | /* Realize the face. */ | 5341 | /* Realize the face. */ |
| @@ -5407,7 +5407,7 @@ realize_non_ascii_face (struct frame *f, Lisp_Object font_object, | |||
| 5407 | && FONT_WEIGHT_NUMERIC (font_object) <= 100); | 5407 | && FONT_WEIGHT_NUMERIC (font_object) <= 100); |
| 5408 | 5408 | ||
| 5409 | /* Don't try to free the colors copied bitwise from BASE_FACE. */ | 5409 | /* Don't try to free the colors copied bitwise from BASE_FACE. */ |
| 5410 | face->colors_copied_bitwise_p = 1; | 5410 | face->colors_copied_bitwise_p = true; |
| 5411 | face->font = NILP (font_object) ? NULL : XFONT_OBJECT (font_object); | 5411 | face->font = NILP (font_object) ? NULL : XFONT_OBJECT (font_object); |
| 5412 | face->gc = 0; | 5412 | face->gc = 0; |
| 5413 | 5413 | ||
| @@ -5491,7 +5491,7 @@ realize_x_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE]) | |||
| 5491 | if (face->font | 5491 | if (face->font |
| 5492 | && FONT_WEIGHT_NAME_NUMERIC (attrs[LFACE_WEIGHT_INDEX]) > 100 | 5492 | && FONT_WEIGHT_NAME_NUMERIC (attrs[LFACE_WEIGHT_INDEX]) > 100 |
| 5493 | && FONT_WEIGHT_NUMERIC (attrs[LFACE_FONT_INDEX]) <= 100) | 5493 | && FONT_WEIGHT_NUMERIC (attrs[LFACE_FONT_INDEX]) <= 100) |
| 5494 | face->overstrike = 1; | 5494 | face->overstrike = true; |
| 5495 | 5495 | ||
| 5496 | /* Load colors, and set remaining attributes. */ | 5496 | /* Load colors, and set remaining attributes. */ |
| 5497 | 5497 | ||
| @@ -5516,7 +5516,7 @@ realize_x_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE]) | |||
| 5516 | face->box = FACE_SIMPLE_BOX; | 5516 | face->box = FACE_SIMPLE_BOX; |
| 5517 | face->box_line_width = XINT (box); | 5517 | face->box_line_width = XINT (box); |
| 5518 | face->box_color = face->foreground; | 5518 | face->box_color = face->foreground; |
| 5519 | face->box_color_defaulted_p = 1; | 5519 | face->box_color_defaulted_p = true; |
| 5520 | } | 5520 | } |
| 5521 | else if (CONSP (box)) | 5521 | else if (CONSP (box)) |
| 5522 | { | 5522 | { |
| @@ -5524,7 +5524,7 @@ realize_x_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE]) | |||
| 5524 | being one of `raised' or `sunken'. */ | 5524 | being one of `raised' or `sunken'. */ |
| 5525 | face->box = FACE_SIMPLE_BOX; | 5525 | face->box = FACE_SIMPLE_BOX; |
| 5526 | face->box_color = face->foreground; | 5526 | face->box_color = face->foreground; |
| 5527 | face->box_color_defaulted_p = 1; | 5527 | face->box_color_defaulted_p = true; |
| 5528 | face->box_line_width = 1; | 5528 | face->box_line_width = 1; |
| 5529 | 5529 | ||
| 5530 | while (CONSP (box)) | 5530 | while (CONSP (box)) |
| @@ -5550,7 +5550,7 @@ realize_x_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE]) | |||
| 5550 | { | 5550 | { |
| 5551 | face->box_color = load_color (f, face, value, | 5551 | face->box_color = load_color (f, face, value, |
| 5552 | LFACE_BOX_INDEX); | 5552 | LFACE_BOX_INDEX); |
| 5553 | face->use_box_color_for_shadows_p = 1; | 5553 | face->use_box_color_for_shadows_p = true; |
| 5554 | } | 5554 | } |
| 5555 | } | 5555 | } |
| 5556 | else if (EQ (keyword, QCstyle)) | 5556 | else if (EQ (keyword, QCstyle)) |
| @@ -5569,34 +5569,34 @@ realize_x_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE]) | |||
| 5569 | if (EQ (underline, Qt)) | 5569 | if (EQ (underline, Qt)) |
| 5570 | { | 5570 | { |
| 5571 | /* Use default color (same as foreground color). */ | 5571 | /* Use default color (same as foreground color). */ |
| 5572 | face->underline_p = 1; | 5572 | face->underline_p = true; |
| 5573 | face->underline_type = FACE_UNDER_LINE; | 5573 | face->underline_type = FACE_UNDER_LINE; |
| 5574 | face->underline_defaulted_p = 1; | 5574 | face->underline_defaulted_p = true; |
| 5575 | face->underline_color = 0; | 5575 | face->underline_color = 0; |
| 5576 | } | 5576 | } |
| 5577 | else if (STRINGP (underline)) | 5577 | else if (STRINGP (underline)) |
| 5578 | { | 5578 | { |
| 5579 | /* Use specified color. */ | 5579 | /* Use specified color. */ |
| 5580 | face->underline_p = 1; | 5580 | face->underline_p = true; |
| 5581 | face->underline_type = FACE_UNDER_LINE; | 5581 | face->underline_type = FACE_UNDER_LINE; |
| 5582 | face->underline_defaulted_p = 0; | 5582 | face->underline_defaulted_p = false; |
| 5583 | face->underline_color | 5583 | face->underline_color |
| 5584 | = load_color (f, face, underline, | 5584 | = load_color (f, face, underline, |
| 5585 | LFACE_UNDERLINE_INDEX); | 5585 | LFACE_UNDERLINE_INDEX); |
| 5586 | } | 5586 | } |
| 5587 | else if (NILP (underline)) | 5587 | else if (NILP (underline)) |
| 5588 | { | 5588 | { |
| 5589 | face->underline_p = 0; | 5589 | face->underline_p = false; |
| 5590 | face->underline_defaulted_p = 0; | 5590 | face->underline_defaulted_p = false; |
| 5591 | face->underline_color = 0; | 5591 | face->underline_color = 0; |
| 5592 | } | 5592 | } |
| 5593 | else if (CONSP (underline)) | 5593 | else if (CONSP (underline)) |
| 5594 | { | 5594 | { |
| 5595 | /* `(:color COLOR :style STYLE)'. | 5595 | /* `(:color COLOR :style STYLE)'. |
| 5596 | STYLE being one of `line' or `wave'. */ | 5596 | STYLE being one of `line' or `wave'. */ |
| 5597 | face->underline_p = 1; | 5597 | face->underline_p = true; |
| 5598 | face->underline_color = 0; | 5598 | face->underline_color = 0; |
| 5599 | face->underline_defaulted_p = 1; | 5599 | face->underline_defaulted_p = true; |
| 5600 | face->underline_type = FACE_UNDER_LINE; | 5600 | face->underline_type = FACE_UNDER_LINE; |
| 5601 | 5601 | ||
| 5602 | /* FIXME? This is also not robust about checking the precise form. | 5602 | /* FIXME? This is also not robust about checking the precise form. |
| @@ -5617,12 +5617,12 @@ realize_x_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE]) | |||
| 5617 | { | 5617 | { |
| 5618 | if (EQ (value, Qforeground_color)) | 5618 | if (EQ (value, Qforeground_color)) |
| 5619 | { | 5619 | { |
| 5620 | face->underline_defaulted_p = 1; | 5620 | face->underline_defaulted_p = true; |
| 5621 | face->underline_color = 0; | 5621 | face->underline_color = 0; |
| 5622 | } | 5622 | } |
| 5623 | else if (STRINGP (value)) | 5623 | else if (STRINGP (value)) |
| 5624 | { | 5624 | { |
| 5625 | face->underline_defaulted_p = 0; | 5625 | face->underline_defaulted_p = false; |
| 5626 | face->underline_color = load_color (f, face, value, | 5626 | face->underline_color = load_color (f, face, value, |
| 5627 | LFACE_UNDERLINE_INDEX); | 5627 | LFACE_UNDERLINE_INDEX); |
| 5628 | } | 5628 | } |
| @@ -5643,13 +5643,13 @@ realize_x_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE]) | |||
| 5643 | face->overline_color | 5643 | face->overline_color |
| 5644 | = load_color (f, face, attrs[LFACE_OVERLINE_INDEX], | 5644 | = load_color (f, face, attrs[LFACE_OVERLINE_INDEX], |
| 5645 | LFACE_OVERLINE_INDEX); | 5645 | LFACE_OVERLINE_INDEX); |
| 5646 | face->overline_p = 1; | 5646 | face->overline_p = true; |
| 5647 | } | 5647 | } |
| 5648 | else if (EQ (overline, Qt)) | 5648 | else if (EQ (overline, Qt)) |
| 5649 | { | 5649 | { |
| 5650 | face->overline_color = face->foreground; | 5650 | face->overline_color = face->foreground; |
| 5651 | face->overline_color_defaulted_p = 1; | 5651 | face->overline_color_defaulted_p = true; |
| 5652 | face->overline_p = 1; | 5652 | face->overline_p = true; |
| 5653 | } | 5653 | } |
| 5654 | 5654 | ||
| 5655 | strike_through = attrs[LFACE_STRIKE_THROUGH_INDEX]; | 5655 | strike_through = attrs[LFACE_STRIKE_THROUGH_INDEX]; |
| @@ -5658,13 +5658,13 @@ realize_x_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE]) | |||
| 5658 | face->strike_through_color | 5658 | face->strike_through_color |
| 5659 | = load_color (f, face, attrs[LFACE_STRIKE_THROUGH_INDEX], | 5659 | = load_color (f, face, attrs[LFACE_STRIKE_THROUGH_INDEX], |
| 5660 | LFACE_STRIKE_THROUGH_INDEX); | 5660 | LFACE_STRIKE_THROUGH_INDEX); |
| 5661 | face->strike_through_p = 1; | 5661 | face->strike_through_p = true; |
| 5662 | } | 5662 | } |
| 5663 | else if (EQ (strike_through, Qt)) | 5663 | else if (EQ (strike_through, Qt)) |
| 5664 | { | 5664 | { |
| 5665 | face->strike_through_color = face->foreground; | 5665 | face->strike_through_color = face->foreground; |
| 5666 | face->strike_through_color_defaulted_p = 1; | 5666 | face->strike_through_color_defaulted_p = true; |
| 5667 | face->strike_through_p = 1; | 5667 | face->strike_through_p = true; |
| 5668 | } | 5668 | } |
| 5669 | 5669 | ||
| 5670 | stipple = attrs[LFACE_STIPPLE_INDEX]; | 5670 | stipple = attrs[LFACE_STIPPLE_INDEX]; |
| @@ -5678,15 +5678,15 @@ realize_x_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE]) | |||
| 5678 | 5678 | ||
| 5679 | /* Map a specified color of face FACE on frame F to a tty color index. | 5679 | /* Map a specified color of face FACE on frame F to a tty color index. |
| 5680 | IDX is either LFACE_FOREGROUND_INDEX or LFACE_BACKGROUND_INDEX, and | 5680 | IDX is either LFACE_FOREGROUND_INDEX or LFACE_BACKGROUND_INDEX, and |
| 5681 | specifies which color to map. Set *DEFAULTED to 1 if mapping to the | 5681 | specifies which color to map. Set *DEFAULTED to true if mapping to the |
| 5682 | default foreground/background colors. */ | 5682 | default foreground/background colors. */ |
| 5683 | 5683 | ||
| 5684 | static void | 5684 | static void |
| 5685 | map_tty_color (struct frame *f, struct face *face, | 5685 | map_tty_color (struct frame *f, struct face *face, |
| 5686 | enum lface_attribute_index idx, int *defaulted) | 5686 | enum lface_attribute_index idx, bool *defaulted) |
| 5687 | { | 5687 | { |
| 5688 | Lisp_Object frame, color, def; | 5688 | Lisp_Object frame, color, def; |
| 5689 | int foreground_p = idx == LFACE_FOREGROUND_INDEX; | 5689 | bool foreground_p = idx == LFACE_FOREGROUND_INDEX; |
| 5690 | unsigned long default_pixel = | 5690 | unsigned long default_pixel = |
| 5691 | foreground_p ? FACE_TTY_DEFAULT_FG_COLOR : FACE_TTY_DEFAULT_BG_COLOR; | 5691 | foreground_p ? FACE_TTY_DEFAULT_FG_COLOR : FACE_TTY_DEFAULT_BG_COLOR; |
| 5692 | unsigned long pixel = default_pixel; | 5692 | unsigned long pixel = default_pixel; |
| @@ -5728,7 +5728,7 @@ map_tty_color (struct frame *f, struct face *face, | |||
| 5728 | else | 5728 | else |
| 5729 | pixel = FRAME_BACKGROUND_PIXEL (f); | 5729 | pixel = FRAME_BACKGROUND_PIXEL (f); |
| 5730 | face->lface[idx] = tty_color_name (f, pixel); | 5730 | face->lface[idx] = tty_color_name (f, pixel); |
| 5731 | *defaulted = 1; | 5731 | *defaulted = true; |
| 5732 | } | 5732 | } |
| 5733 | else if (pixel == default_other_pixel) | 5733 | else if (pixel == default_other_pixel) |
| 5734 | { | 5734 | { |
| @@ -5737,7 +5737,7 @@ map_tty_color (struct frame *f, struct face *face, | |||
| 5737 | else | 5737 | else |
| 5738 | pixel = FRAME_FOREGROUND_PIXEL (f); | 5738 | pixel = FRAME_FOREGROUND_PIXEL (f); |
| 5739 | face->lface[idx] = tty_color_name (f, pixel); | 5739 | face->lface[idx] = tty_color_name (f, pixel); |
| 5740 | *defaulted = 1; | 5740 | *defaulted = true; |
| 5741 | } | 5741 | } |
| 5742 | } | 5742 | } |
| 5743 | #endif /* MSDOS */ | 5743 | #endif /* MSDOS */ |
| @@ -5760,7 +5760,7 @@ realize_tty_face (struct face_cache *cache, | |||
| 5760 | { | 5760 | { |
| 5761 | struct face *face; | 5761 | struct face *face; |
| 5762 | int weight, slant; | 5762 | int weight, slant; |
| 5763 | int face_colors_defaulted = 0; | 5763 | bool face_colors_defaulted = false; |
| 5764 | struct frame *f = cache->f; | 5764 | struct frame *f = cache->f; |
| 5765 | 5765 | ||
| 5766 | /* Frame must be a termcap frame. */ | 5766 | /* Frame must be a termcap frame. */ |
| @@ -5768,7 +5768,7 @@ realize_tty_face (struct face_cache *cache, | |||
| 5768 | 5768 | ||
| 5769 | /* Allocate a new realized face. */ | 5769 | /* Allocate a new realized face. */ |
| 5770 | face = make_realized_face (attrs); | 5770 | face = make_realized_face (attrs); |
| 5771 | #if 0 | 5771 | #if false |
| 5772 | face->font_name = FRAME_MSDOS_P (cache->f) ? "ms-dos" : "tty"; | 5772 | face->font_name = FRAME_MSDOS_P (cache->f) ? "ms-dos" : "tty"; |
| 5773 | #endif | 5773 | #endif |
| 5774 | 5774 | ||
| @@ -5776,13 +5776,13 @@ realize_tty_face (struct face_cache *cache, | |||
| 5776 | weight = FONT_WEIGHT_NAME_NUMERIC (attrs[LFACE_WEIGHT_INDEX]); | 5776 | weight = FONT_WEIGHT_NAME_NUMERIC (attrs[LFACE_WEIGHT_INDEX]); |
| 5777 | slant = FONT_SLANT_NAME_NUMERIC (attrs[LFACE_SLANT_INDEX]); | 5777 | slant = FONT_SLANT_NAME_NUMERIC (attrs[LFACE_SLANT_INDEX]); |
| 5778 | if (weight > 100) | 5778 | if (weight > 100) |
| 5779 | face->tty_bold_p = 1; | 5779 | face->tty_bold_p = true; |
| 5780 | if (slant != 100) | 5780 | if (slant != 100) |
| 5781 | face->tty_italic_p = 1; | 5781 | face->tty_italic_p = true; |
| 5782 | if (!NILP (attrs[LFACE_UNDERLINE_INDEX])) | 5782 | if (!NILP (attrs[LFACE_UNDERLINE_INDEX])) |
| 5783 | face->tty_underline_p = 1; | 5783 | face->tty_underline_p = true; |
| 5784 | if (!NILP (attrs[LFACE_INVERSE_INDEX])) | 5784 | if (!NILP (attrs[LFACE_INVERSE_INDEX])) |
| 5785 | face->tty_reverse_p = 1; | 5785 | face->tty_reverse_p = true; |
| 5786 | 5786 | ||
| 5787 | /* Map color names to color indices. */ | 5787 | /* Map color names to color indices. */ |
| 5788 | map_tty_color (f, face, LFACE_FOREGROUND_INDEX, &face_colors_defaulted); | 5788 | map_tty_color (f, face, LFACE_FOREGROUND_INDEX, &face_colors_defaulted); |
| @@ -5802,7 +5802,7 @@ realize_tty_face (struct face_cache *cache, | |||
| 5802 | && face->tty_bold_p | 5802 | && face->tty_bold_p |
| 5803 | && face->background == FACE_TTY_DEFAULT_FG_COLOR | 5803 | && face->background == FACE_TTY_DEFAULT_FG_COLOR |
| 5804 | && face->foreground == FACE_TTY_DEFAULT_BG_COLOR) | 5804 | && face->foreground == FACE_TTY_DEFAULT_BG_COLOR) |
| 5805 | face->tty_bold_p = 0; | 5805 | face->tty_bold_p = false; |
| 5806 | 5806 | ||
| 5807 | return face; | 5807 | return face; |
| 5808 | } | 5808 | } |
| @@ -5851,7 +5851,7 @@ compute_char_face (struct frame *f, int ch, Lisp_Object prop) | |||
| 5851 | Lisp_Object attrs[LFACE_VECTOR_SIZE]; | 5851 | Lisp_Object attrs[LFACE_VECTOR_SIZE]; |
| 5852 | struct face *default_face = FACE_FROM_ID (f, DEFAULT_FACE_ID); | 5852 | struct face *default_face = FACE_FROM_ID (f, DEFAULT_FACE_ID); |
| 5853 | memcpy (attrs, default_face->lface, sizeof attrs); | 5853 | memcpy (attrs, default_face->lface, sizeof attrs); |
| 5854 | merge_face_ref (f, prop, attrs, 1, 0); | 5854 | merge_face_ref (f, prop, attrs, true, 0); |
| 5855 | face_id = lookup_face (f, attrs); | 5855 | face_id = lookup_face (f, attrs); |
| 5856 | } | 5856 | } |
| 5857 | 5857 | ||
| @@ -5869,7 +5869,7 @@ compute_char_face (struct frame *f, int ch, Lisp_Object prop) | |||
| 5869 | LIMIT is a position not to scan beyond. That is to limit the time | 5869 | LIMIT is a position not to scan beyond. That is to limit the time |
| 5870 | this function can take. | 5870 | this function can take. |
| 5871 | 5871 | ||
| 5872 | If MOUSE is non-zero, use the character's mouse-face, not its face. | 5872 | If MOUSE, use the character's mouse-face, not its face. |
| 5873 | 5873 | ||
| 5874 | BASE_FACE_ID, if non-negative, specifies a base face id to use | 5874 | BASE_FACE_ID, if non-negative, specifies a base face id to use |
| 5875 | instead of DEFAULT_FACE_ID. | 5875 | instead of DEFAULT_FACE_ID. |
| @@ -5879,7 +5879,7 @@ compute_char_face (struct frame *f, int ch, Lisp_Object prop) | |||
| 5879 | int | 5879 | int |
| 5880 | face_at_buffer_position (struct window *w, ptrdiff_t pos, | 5880 | face_at_buffer_position (struct window *w, ptrdiff_t pos, |
| 5881 | ptrdiff_t *endptr, ptrdiff_t limit, | 5881 | ptrdiff_t *endptr, ptrdiff_t limit, |
| 5882 | int mouse, int base_face_id) | 5882 | bool mouse, int base_face_id) |
| 5883 | { | 5883 | { |
| 5884 | struct frame *f = XFRAME (w->frame); | 5884 | struct frame *f = XFRAME (w->frame); |
| 5885 | Lisp_Object attrs[LFACE_VECTOR_SIZE]; | 5885 | Lisp_Object attrs[LFACE_VECTOR_SIZE]; |
| @@ -5912,7 +5912,7 @@ face_at_buffer_position (struct window *w, ptrdiff_t pos, | |||
| 5912 | { | 5912 | { |
| 5913 | ptrdiff_t next_overlay; | 5913 | ptrdiff_t next_overlay; |
| 5914 | 5914 | ||
| 5915 | GET_OVERLAYS_AT (pos, overlay_vec, noverlays, &next_overlay, 0); | 5915 | GET_OVERLAYS_AT (pos, overlay_vec, noverlays, &next_overlay, false); |
| 5916 | if (next_overlay < endpos) | 5916 | if (next_overlay < endpos) |
| 5917 | endpos = next_overlay; | 5917 | endpos = next_overlay; |
| 5918 | } | 5918 | } |
| @@ -5945,7 +5945,7 @@ face_at_buffer_position (struct window *w, ptrdiff_t pos, | |||
| 5945 | 5945 | ||
| 5946 | /* Merge in attributes specified via text properties. */ | 5946 | /* Merge in attributes specified via text properties. */ |
| 5947 | if (!NILP (prop)) | 5947 | if (!NILP (prop)) |
| 5948 | merge_face_ref (f, prop, attrs, 1, 0); | 5948 | merge_face_ref (f, prop, attrs, true, 0); |
| 5949 | 5949 | ||
| 5950 | /* Now merge the overlay data. */ | 5950 | /* Now merge the overlay data. */ |
| 5951 | noverlays = sort_overlays (overlay_vec, noverlays, w); | 5951 | noverlays = sort_overlays (overlay_vec, noverlays, w); |
| @@ -5956,7 +5956,7 @@ face_at_buffer_position (struct window *w, ptrdiff_t pos, | |||
| 5956 | 5956 | ||
| 5957 | prop = Foverlay_get (overlay_vec[i], propname); | 5957 | prop = Foverlay_get (overlay_vec[i], propname); |
| 5958 | if (!NILP (prop)) | 5958 | if (!NILP (prop)) |
| 5959 | merge_face_ref (f, prop, attrs, 1, 0); | 5959 | merge_face_ref (f, prop, attrs, true, 0); |
| 5960 | 5960 | ||
| 5961 | oend = OVERLAY_END (overlay_vec[i]); | 5961 | oend = OVERLAY_END (overlay_vec[i]); |
| 5962 | oendpos = OVERLAY_POSITION (oend); | 5962 | oendpos = OVERLAY_POSITION (oend); |
| @@ -5982,7 +5982,7 @@ face_at_buffer_position (struct window *w, ptrdiff_t pos, | |||
| 5982 | int | 5982 | int |
| 5983 | face_for_overlay_string (struct window *w, ptrdiff_t pos, | 5983 | face_for_overlay_string (struct window *w, ptrdiff_t pos, |
| 5984 | ptrdiff_t *endptr, ptrdiff_t limit, | 5984 | ptrdiff_t *endptr, ptrdiff_t limit, |
| 5985 | int mouse, Lisp_Object overlay) | 5985 | bool mouse, Lisp_Object overlay) |
| 5986 | { | 5986 | { |
| 5987 | struct frame *f = XFRAME (w->frame); | 5987 | struct frame *f = XFRAME (w->frame); |
| 5988 | Lisp_Object attrs[LFACE_VECTOR_SIZE]; | 5988 | Lisp_Object attrs[LFACE_VECTOR_SIZE]; |
| @@ -6021,7 +6021,7 @@ face_for_overlay_string (struct window *w, ptrdiff_t pos, | |||
| 6021 | 6021 | ||
| 6022 | /* Merge in attributes specified via text properties. */ | 6022 | /* Merge in attributes specified via text properties. */ |
| 6023 | if (!NILP (prop)) | 6023 | if (!NILP (prop)) |
| 6024 | merge_face_ref (f, prop, attrs, 1, 0); | 6024 | merge_face_ref (f, prop, attrs, true, 0); |
| 6025 | 6025 | ||
| 6026 | *endptr = endpos; | 6026 | *endptr = endpos; |
| 6027 | 6027 | ||
| @@ -6043,7 +6043,7 @@ face_for_overlay_string (struct window *w, ptrdiff_t pos, | |||
| 6043 | BASE_FACE_ID is the id of a face to merge with. For strings coming | 6043 | BASE_FACE_ID is the id of a face to merge with. For strings coming |
| 6044 | from overlays or the `display' property it is the face at BUFPOS. | 6044 | from overlays or the `display' property it is the face at BUFPOS. |
| 6045 | 6045 | ||
| 6046 | If MOUSE_P is non-zero, use the character's mouse-face, not its face. | 6046 | If MOUSE_P, use the character's mouse-face, not its face. |
| 6047 | 6047 | ||
| 6048 | Set *ENDPTR to the next position where to check for faces in | 6048 | Set *ENDPTR to the next position where to check for faces in |
| 6049 | STRING; -1 if the face is constant from POS to the end of the | 6049 | STRING; -1 if the face is constant from POS to the end of the |
| @@ -6056,7 +6056,7 @@ int | |||
| 6056 | face_at_string_position (struct window *w, Lisp_Object string, | 6056 | face_at_string_position (struct window *w, Lisp_Object string, |
| 6057 | ptrdiff_t pos, ptrdiff_t bufpos, | 6057 | ptrdiff_t pos, ptrdiff_t bufpos, |
| 6058 | ptrdiff_t *endptr, enum face_id base_face_id, | 6058 | ptrdiff_t *endptr, enum face_id base_face_id, |
| 6059 | int mouse_p) | 6059 | bool mouse_p) |
| 6060 | { | 6060 | { |
| 6061 | Lisp_Object prop, position, end, limit; | 6061 | Lisp_Object prop, position, end, limit; |
| 6062 | struct frame *f = XFRAME (WINDOW_FRAME (w)); | 6062 | struct frame *f = XFRAME (WINDOW_FRAME (w)); |
| @@ -6101,7 +6101,7 @@ face_at_string_position (struct window *w, Lisp_Object string, | |||
| 6101 | 6101 | ||
| 6102 | /* Merge in attributes specified via text properties. */ | 6102 | /* Merge in attributes specified via text properties. */ |
| 6103 | if (!NILP (prop)) | 6103 | if (!NILP (prop)) |
| 6104 | merge_face_ref (f, prop, attrs, 1, 0); | 6104 | merge_face_ref (f, prop, attrs, true, 0); |
| 6105 | 6105 | ||
| 6106 | /* Look up a realized face with the given face attributes, | 6106 | /* Look up a realized face with the given face attributes, |
| 6107 | or realize a new one for ASCII characters. */ | 6107 | or realize a new one for ASCII characters. */ |