comparison src/redisplay.c @ 438:84b14dcb0985 r21-2-27

Import from CVS: tag r21-2-27
author cvs
date Mon, 13 Aug 2007 11:32:25 +0200
parents 9d177e8d4150
children 8de8e3f6228a
comparison
equal deleted inserted replaced
437:e2a4e8b94b82 438:84b14dcb0985
244 { 244 {
245 Dynarr_declare (prop_block); 245 Dynarr_declare (prop_block);
246 } prop_block_dynarr; 246 } prop_block_dynarr;
247 247
248 248
249 static void generate_formatted_string_db (Lisp_Object format_str,
250 Lisp_Object result_str,
251 struct window *w,
252 struct display_line *dl,
253 struct display_block *db,
254 face_index findex, int min_pixpos,
255 int max_pixpos, int type);
256 static Charcount generate_fstring_runes (struct window *w, pos_data *data, 249 static Charcount generate_fstring_runes (struct window *w, pos_data *data,
257 Charcount pos, Charcount min_pos, 250 Charcount pos, Charcount min_pos,
258 Charcount max_pos, Lisp_Object elt, 251 Charcount max_pos, Lisp_Object elt,
259 int depth, int max_pixsize, 252 int depth, int max_pixsize,
260 face_index findex, int type); 253 face_index findex, int type,
254 Charcount *offset,
255 Lisp_Object cur_ext);
261 static prop_block_dynarr *add_glyph_rune (pos_data *data, 256 static prop_block_dynarr *add_glyph_rune (pos_data *data,
262 struct glyph_block *gb, 257 struct glyph_block *gb,
263 int pos_type, int allow_cursor, 258 int pos_type, int allow_cursor,
264 struct glyph_cachel *cachel); 259 struct glyph_cachel *cachel);
265 static Bytind create_text_block (struct window *w, struct display_line *dl, 260 static Bytind create_text_block (struct window *w, struct display_line *dl,
298 routines. We used to just give each window a third set. However, 293 routines. We used to just give each window a third set. However,
299 we always fully regenerate the structures when needed so there 294 we always fully regenerate the structures when needed so there
300 isn't any reason we need more than a single set. */ 295 isn't any reason we need more than a single set. */
301 display_line_dynarr *cmotion_display_lines; 296 display_line_dynarr *cmotion_display_lines;
302 297
303 /* Used by generate_formatted_string. Global because they get used so
304 much that the dynamic allocation time adds up. */
305 static Emchar_dynarr *formatted_string_emchar_dynarr;
306 static struct display_line formatted_string_display_line;
307 /* We store the extents that we need to generate in a Dynarr and then 298 /* We store the extents that we need to generate in a Dynarr and then
308 frob them all on at the end of generating the string. We do it 299 frob them all on at the end of generating the string. We do it
309 this way rather than adding them as we generate the string because 300 this way rather than adding them as we generate the string because
310 we don't store the text into the resulting string until we're done 301 we don't store the text into the resulting string until we're done
311 (to avoid having to resize the string multiple times), and we don't 302 (to avoid having to resize the string multiple times), and we don't
425 int windows_structure_changed; 416 int windows_structure_changed;
426 417
427 /* If non-nil, use vertical bar cursor. */ 418 /* If non-nil, use vertical bar cursor. */
428 Lisp_Object Vbar_cursor; 419 Lisp_Object Vbar_cursor;
429 Lisp_Object Qbar_cursor; 420 Lisp_Object Qbar_cursor;
430
431 421
432 int visible_bell; /* If true and the terminal will support it 422 int visible_bell; /* If true and the terminal will support it
433 then the frame will flash instead of 423 then the frame will flash instead of
434 beeping when an error occurs */ 424 beeping when an error occurs */
435 425
1549 Lisp_Object face; 1539 Lisp_Object face;
1550 1540
1551 if (cachel) 1541 if (cachel)
1552 width = cachel->width; 1542 width = cachel->width;
1553 else 1543 else
1554 width = glyph_width (gb->glyph, Qnil, data->findex, data->window); 1544 width = glyph_width (gb->glyph, data->window);
1555 1545
1556 if (!width) 1546 if (!width)
1557 return NULL; 1547 return NULL;
1558 1548
1559 if (data->start_col || data->start_col_xoffset) 1549 if (data->start_col || data->start_col_xoffset)
1612 ascent = cachel->ascent; 1602 ascent = cachel->ascent;
1613 descent = cachel->descent; 1603 descent = cachel->descent;
1614 } 1604 }
1615 else 1605 else
1616 { 1606 {
1617 ascent = glyph_ascent (gb->glyph, Qnil, data->findex, data->window); 1607 ascent = glyph_ascent (gb->glyph, data->window);
1618 descent = glyph_descent (gb->glyph, Qnil, data->findex, 1608 descent = glyph_descent (gb->glyph, data->window);
1619 data->window);
1620 } 1609 }
1621 1610
1622 baseline = glyph_baseline (gb->glyph, data->window); 1611 baseline = glyph_baseline (gb->glyph, data->window);
1623 1612
1624 if (glyph_contrib_p (gb->glyph, data->window)) 1613 if (glyph_contrib_p (gb->glyph, data->window))
2775 if (glyph_contrib_p (gb->glyph, window)) 2764 if (glyph_contrib_p (gb->glyph, window))
2776 { 2765 {
2777 unsigned short ascent, descent; 2766 unsigned short ascent, descent;
2778 Lisp_Object baseline = glyph_baseline (gb->glyph, window); 2767 Lisp_Object baseline = glyph_baseline (gb->glyph, window);
2779 2768
2780 ascent = glyph_ascent (gb->glyph, Qnil, gb->findex, window); 2769 ascent = glyph_ascent (gb->glyph, window);
2781 descent = glyph_descent (gb->glyph, Qnil, gb->findex, window); 2770 descent = glyph_descent (gb->glyph, window);
2782 2771
2783 /* A pixmap that has not had a baseline explicitly set. 2772 /* A pixmap that has not had a baseline explicitly set.
2784 We use the existing ascent / descent ratio of the 2773 We use the existing ascent / descent ratio of the
2785 line. */ 2774 line. */
2786 if (NILP (baseline)) 2775 if (NILP (baseline))
2890 2879
2891 if (extent_begin_glyph_layout (XEXTENT (gb->extent)) == GL_WHITESPACE) 2880 if (extent_begin_glyph_layout (XEXTENT (gb->extent)) == GL_WHITESPACE)
2892 { 2881 {
2893 int width; 2882 int width;
2894 2883
2895 width = glyph_width (gb->glyph, Qnil, gb->findex, window); 2884 width = glyph_width (gb->glyph, window);
2896 2885
2897 if (white_in_start - width >= left_in_end) 2886 if (white_in_start - width >= left_in_end)
2898 { 2887 {
2899 white_in_cnt++; 2888 white_in_cnt++;
2900 white_in_start -= width; 2889 white_in_start -= width;
2941 abort (); /* these should have been handled in add_glyph_rune */ 2930 abort (); /* these should have been handled in add_glyph_rune */
2942 2931
2943 if (extent_begin_glyph_layout (XEXTENT (gb->extent)) == 2932 if (extent_begin_glyph_layout (XEXTENT (gb->extent)) ==
2944 GL_INSIDE_MARGIN) 2933 GL_INSIDE_MARGIN)
2945 { 2934 {
2946 gb->width = glyph_width (gb->glyph, Qnil, gb->findex, window); 2935 gb->width = glyph_width (gb->glyph, window);
2947 used_in += gb->width; 2936 used_in += gb->width;
2948 Dynarr_add (ib, *gb); 2937 Dynarr_add (ib, *gb);
2949 } 2938 }
2950 2939
2951 elt++; 2940 elt++;
3010 abort (); /* these should have been handled in add_glyph_rune */ 2999 abort (); /* these should have been handled in add_glyph_rune */
3011 3000
3012 if (extent_begin_glyph_layout (XEXTENT (gb->extent)) == 3001 if (extent_begin_glyph_layout (XEXTENT (gb->extent)) ==
3013 GL_INSIDE_MARGIN) 3002 GL_INSIDE_MARGIN)
3014 { 3003 {
3015 int width = glyph_width (gb->glyph, Qnil, gb->findex, window); 3004 int width = glyph_width (gb->glyph, window);
3016 3005
3017 if (used_out) 3006 if (used_out)
3018 { 3007 {
3019 in_out_cnt++; 3008 in_out_cnt++;
3020 in_out_start -= width; 3009 in_out_start -= width;
3052 abort (); /* these should have been handled in add_glyph_rune */ 3041 abort (); /* these should have been handled in add_glyph_rune */
3053 3042
3054 if (extent_begin_glyph_layout (XEXTENT (gb->extent)) == 3043 if (extent_begin_glyph_layout (XEXTENT (gb->extent)) ==
3055 GL_OUTSIDE_MARGIN) 3044 GL_OUTSIDE_MARGIN)
3056 { 3045 {
3057 int width = glyph_width (gb->glyph, Qnil, gb->findex, window); 3046 int width = glyph_width (gb->glyph, window);
3058 3047
3059 if (out_end + width <= in_out_start) 3048 if (out_end + width <= in_out_start)
3060 { 3049 {
3061 out_cnt++; 3050 out_cnt++;
3062 out_end += width; 3051 out_end += width;
3209 if (NILP (gb->extent)) 3198 if (NILP (gb->extent))
3210 abort (); /* these should have been handled in add_glyph_rune */ 3199 abort (); /* these should have been handled in add_glyph_rune */
3211 3200
3212 if (extent_end_glyph_layout (XEXTENT (gb->extent)) == GL_WHITESPACE) 3201 if (extent_end_glyph_layout (XEXTENT (gb->extent)) == GL_WHITESPACE)
3213 { 3202 {
3214 int width = glyph_width (gb->glyph, Qnil, gb->findex, window); 3203 int width = glyph_width (gb->glyph, window);
3215 3204
3216 if (white_in_end + width <= dl->bounds.right_in) 3205 if (white_in_end + width <= dl->bounds.right_in)
3217 { 3206 {
3218 white_in_cnt++; 3207 white_in_cnt++;
3219 white_in_end += width; 3208 white_in_end += width;
3259 if (NILP (gb->extent)) 3248 if (NILP (gb->extent))
3260 abort (); /* these should have been handled in add_glyph_rune */ 3249 abort (); /* these should have been handled in add_glyph_rune */
3261 3250
3262 if (extent_end_glyph_layout (XEXTENT (gb->extent)) == GL_INSIDE_MARGIN) 3251 if (extent_end_glyph_layout (XEXTENT (gb->extent)) == GL_INSIDE_MARGIN)
3263 { 3252 {
3264 gb->width = glyph_width (gb->glyph, Qnil, gb->findex, window); 3253 gb->width = glyph_width (gb->glyph, window);
3265 used_in += gb->width; 3254 used_in += gb->width;
3266 Dynarr_add (ib, *gb); 3255 Dynarr_add (ib, *gb);
3267 } 3256 }
3268 3257
3269 elt++; 3258 elt++;
3323 if (NILP (gb->extent)) 3312 if (NILP (gb->extent))
3324 abort (); /* these should have been handled in add_glyph_rune */ 3313 abort (); /* these should have been handled in add_glyph_rune */
3325 3314
3326 if (extent_end_glyph_layout (XEXTENT (gb->extent)) == GL_INSIDE_MARGIN) 3315 if (extent_end_glyph_layout (XEXTENT (gb->extent)) == GL_INSIDE_MARGIN)
3327 { 3316 {
3328 int width = glyph_width (gb->glyph, Qnil, gb->findex, window); 3317 int width = glyph_width (gb->glyph, window);
3329 3318
3330 if (used_out) 3319 if (used_out)
3331 { 3320 {
3332 in_out_cnt++; 3321 in_out_cnt++;
3333 in_out_end += width; 3322 in_out_end += width;
3364 if (NILP (gb->extent)) 3353 if (NILP (gb->extent))
3365 abort (); /* these should have been handled in add_glyph_rune */ 3354 abort (); /* these should have been handled in add_glyph_rune */
3366 3355
3367 if (extent_end_glyph_layout (XEXTENT (gb->extent)) == GL_OUTSIDE_MARGIN) 3356 if (extent_end_glyph_layout (XEXTENT (gb->extent)) == GL_OUTSIDE_MARGIN)
3368 { 3357 {
3369 int width = glyph_width (gb->glyph, Qnil, gb->findex, window); 3358 int width = glyph_width (gb->glyph, window);
3370 3359
3371 if (out_start - width >= in_out_end) 3360 if (out_start - width >= in_out_end)
3372 { 3361 {
3373 out_cnt++; 3362 out_cnt++;
3374 out_start -= width; 3363 out_start -= width;
3480 /* */ 3469 /* */
3481 /* modeline routines */ 3470 /* modeline routines */
3482 /* */ 3471 /* */
3483 /***************************************************************************/ 3472 /***************************************************************************/
3484 3473
3485 /* Ensure that the given display line DL accurately represents the 3474 /* This function is also used in frame.c by `generate_title_string' */
3486 modeline for the given window. */ 3475 void
3487
3488 static void
3489 generate_modeline (struct window *w, struct display_line *dl, int type)
3490 {
3491 struct buffer *b = XBUFFER (w->buffer);
3492 struct frame *f = XFRAME (w->frame);
3493 struct device *d = XDEVICE (f->device);
3494
3495 /* Unlike display line and rune pointers, this one can't change underneath
3496 our feet. */
3497 struct display_block *db = get_display_block_from_line (dl, TEXT);
3498 int max_pixpos, min_pixpos, ypos_adj;
3499 Lisp_Object font_inst;
3500
3501 /* This will actually determine incorrect inside boundaries for the
3502 modeline since it ignores the margins. However being aware of this fact
3503 we never use those values anywhere so it doesn't matter. */
3504 dl->bounds = calculate_display_line_boundaries (w, 1);
3505
3506 /* We are generating a modeline. */
3507 dl->modeline = 1;
3508 dl->cursor_elt = -1;
3509
3510 /* Reset the runes on the modeline. */
3511 Dynarr_reset (db->runes);
3512
3513 if (!WINDOW_HAS_MODELINE_P (w))
3514 {
3515 struct rune rb;
3516
3517 /* If there is a horizontal scrollbar, don't add anything. */
3518 if (window_scrollbar_height (w))
3519 return;
3520
3521 dl->ascent = DEVMETH (d, divider_height, ());
3522 dl->descent = 0;
3523 /* The modeline is at the bottom of the gutters. */
3524 dl->ypos = WINDOW_BOTTOM (w);
3525
3526 /* adjust for the bottom gutter */
3527 if (window_is_lowest (w))
3528 dl->ypos -= FRAME_BOTTOM_GUTTER_BOUNDS (f);
3529
3530 rb.findex = MODELINE_INDEX;
3531 rb.xpos = dl->bounds.left_out;
3532 rb.width = dl->bounds.right_out - dl->bounds.left_out;
3533 rb.bufpos = 0;
3534 rb.endpos = 0;
3535 rb.type = RUNE_HLINE;
3536 rb.object.hline.thickness = 1;
3537 rb.object.hline.yoffset = 0;
3538 rb.cursor_type = NO_CURSOR;
3539
3540 if (!EQ (Qzero, w->modeline_shadow_thickness)
3541 && FRAME_WIN_P (f))
3542 {
3543 int shadow_thickness = MODELINE_SHADOW_THICKNESS (w);
3544
3545 dl->ypos -= shadow_thickness;
3546 rb.xpos += shadow_thickness;
3547 rb.width -= 2 * shadow_thickness;
3548 }
3549
3550 Dynarr_add (db->runes, rb);
3551 return;
3552 }
3553
3554 /* !!#### not right; needs to compute the max height of
3555 all the charsets */
3556 font_inst = WINDOW_FACE_CACHEL_FONT (w, MODELINE_INDEX, Vcharset_ascii);
3557
3558 dl->ascent = XFONT_INSTANCE (font_inst)->ascent;
3559 dl->descent = XFONT_INSTANCE (font_inst)->descent;
3560
3561 min_pixpos = dl->bounds.left_out;
3562 max_pixpos = dl->bounds.right_out;
3563
3564 if (!EQ (Qzero, w->modeline_shadow_thickness) && FRAME_WIN_P (f))
3565 {
3566 int shadow_thickness = MODELINE_SHADOW_THICKNESS (w);
3567
3568 ypos_adj = shadow_thickness;
3569 min_pixpos += shadow_thickness;
3570 max_pixpos -= shadow_thickness;
3571 }
3572 else
3573 ypos_adj = 0;
3574
3575 generate_formatted_string_db (b->modeline_format,
3576 b->generated_modeline_string, w, dl, db,
3577 MODELINE_INDEX, min_pixpos, max_pixpos, type);
3578
3579 /* The modeline is at the bottom of the gutters. We have to wait to
3580 set this until we've generated the modeline in order to account
3581 for any embedded faces. */
3582 dl->ypos = WINDOW_BOTTOM (w) - dl->descent - ypos_adj;
3583 /* adjust for the bottom gutter */
3584 if (window_is_lowest (w))
3585 dl->ypos -= FRAME_BOTTOM_GUTTER_BOUNDS (f);
3586 }
3587
3588 static void
3589 generate_formatted_string_db (Lisp_Object format_str, Lisp_Object result_str, 3476 generate_formatted_string_db (Lisp_Object format_str, Lisp_Object result_str,
3590 struct window *w, struct display_line *dl, 3477 struct window *w, struct display_line *dl,
3591 struct display_block *db, face_index findex, 3478 struct display_block *db, face_index findex,
3592 int min_pixpos, int max_pixpos, int type) 3479 int min_pixpos, int max_pixpos, int type)
3593 { 3480 {
3594 struct frame *f = XFRAME (w->frame); 3481 struct frame *f = XFRAME (w->frame);
3595 struct device *d = XDEVICE (f->device); 3482 struct device *d = XDEVICE (f->device);
3596 3483
3597 pos_data data; 3484 pos_data data;
3598 int c_pixpos; 3485 int c_pixpos;
3486 Charcount offset = 0;
3599 3487
3600 xzero (data); 3488 xzero (data);
3601 data.d = d; 3489 data.d = d;
3602 data.db = db; 3490 data.db = db;
3603 data.dl = dl; 3491 data.dl = dl;
3614 3502
3615 Dynarr_reset (formatted_string_extent_dynarr); 3503 Dynarr_reset (formatted_string_extent_dynarr);
3616 Dynarr_reset (formatted_string_extent_start_dynarr); 3504 Dynarr_reset (formatted_string_extent_start_dynarr);
3617 Dynarr_reset (formatted_string_extent_end_dynarr); 3505 Dynarr_reset (formatted_string_extent_end_dynarr);
3618 3506
3619 /* This recursively builds up the modeline. */ 3507 /* result_str is nil when we're building a frame or icon title. Otherwise,
3508 we're building a modeline, so the offset starts at the modeline
3509 horizontal scrolling ammount */
3510 if (! NILP (result_str))
3511 offset = w->modeline_hscroll;
3620 generate_fstring_runes (w, &data, 0, 0, -1, format_str, 0, 3512 generate_fstring_runes (w, &data, 0, 0, -1, format_str, 0,
3621 max_pixpos - min_pixpos, findex, type); 3513 max_pixpos - min_pixpos, findex, type, &offset,
3514 Qnil);
3622 3515
3623 if (Dynarr_length (db->runes)) 3516 if (Dynarr_length (db->runes))
3624 { 3517 {
3625 struct rune *rb = 3518 struct rune *rb =
3626 Dynarr_atp (db->runes, Dynarr_length (db->runes) - 1); 3519 Dynarr_atp (db->runes, Dynarr_length (db->runes) - 1);
3687 result_str); 3580 result_str);
3688 } 3581 }
3689 } 3582 }
3690 } 3583 }
3691 3584
3585 /* Ensure that the given display line DL accurately represents the
3586 modeline for the given window. */
3587 static void
3588 generate_modeline (struct window *w, struct display_line *dl, int type)
3589 {
3590 struct buffer *b = XBUFFER (w->buffer);
3591 struct frame *f = XFRAME (w->frame);
3592 struct device *d = XDEVICE (f->device);
3593
3594 /* Unlike display line and rune pointers, this one can't change underneath
3595 our feet. */
3596 struct display_block *db = get_display_block_from_line (dl, TEXT);
3597 int max_pixpos, min_pixpos, ypos_adj;
3598 Lisp_Object font_inst;
3599
3600 /* This will actually determine incorrect inside boundaries for the
3601 modeline since it ignores the margins. However being aware of this fact
3602 we never use those values anywhere so it doesn't matter. */
3603 dl->bounds = calculate_display_line_boundaries (w, 1);
3604
3605 /* We are generating a modeline. */
3606 dl->modeline = 1;
3607 dl->cursor_elt = -1;
3608
3609 /* Reset the runes on the modeline. */
3610 Dynarr_reset (db->runes);
3611
3612 if (!WINDOW_HAS_MODELINE_P (w))
3613 {
3614 struct rune rb;
3615
3616 /* If there is a horizontal scrollbar, don't add anything. */
3617 if (window_scrollbar_height (w))
3618 return;
3619
3620 dl->ascent = DEVMETH (d, divider_height, ());
3621 dl->descent = 0;
3622 /* The modeline is at the bottom of the gutters. */
3623 dl->ypos = WINDOW_BOTTOM (w);
3624
3625 /* adjust for the bottom gutter */
3626 if (window_is_lowest (w))
3627 dl->ypos -= FRAME_BOTTOM_GUTTER_BOUNDS (f);
3628
3629 rb.findex = MODELINE_INDEX;
3630 rb.xpos = dl->bounds.left_out;
3631 rb.width = dl->bounds.right_out - dl->bounds.left_out;
3632 rb.bufpos = 0;
3633 rb.endpos = 0;
3634 rb.type = RUNE_HLINE;
3635 rb.object.hline.thickness = 1;
3636 rb.object.hline.yoffset = 0;
3637 rb.cursor_type = NO_CURSOR;
3638
3639 if (!EQ (Qzero, w->modeline_shadow_thickness)
3640 && FRAME_WIN_P (f))
3641 {
3642 int shadow_thickness = MODELINE_SHADOW_THICKNESS (w);
3643
3644 dl->ypos -= shadow_thickness;
3645 rb.xpos += shadow_thickness;
3646 rb.width -= 2 * shadow_thickness;
3647 }
3648
3649 Dynarr_add (db->runes, rb);
3650 return;
3651 }
3652
3653 /* !!#### not right; needs to compute the max height of
3654 all the charsets */
3655 font_inst = WINDOW_FACE_CACHEL_FONT (w, MODELINE_INDEX, Vcharset_ascii);
3656
3657 dl->ascent = XFONT_INSTANCE (font_inst)->ascent;
3658 dl->descent = XFONT_INSTANCE (font_inst)->descent;
3659
3660 min_pixpos = dl->bounds.left_out;
3661 max_pixpos = dl->bounds.right_out;
3662
3663 if (!EQ (Qzero, w->modeline_shadow_thickness) && FRAME_WIN_P (f))
3664 {
3665 int shadow_thickness = MODELINE_SHADOW_THICKNESS (w);
3666
3667 ypos_adj = shadow_thickness;
3668 min_pixpos += shadow_thickness;
3669 max_pixpos -= shadow_thickness;
3670 }
3671 else
3672 ypos_adj = 0;
3673
3674 generate_formatted_string_db (b->modeline_format,
3675 b->generated_modeline_string, w, dl, db,
3676 MODELINE_INDEX, min_pixpos, max_pixpos, type);
3677
3678 /* The modeline is at the bottom of the gutters. We have to wait to
3679 set this until we've generated the modeline in order to account
3680 for any embedded faces. */
3681 dl->ypos = WINDOW_BOTTOM (w) - dl->descent - ypos_adj;
3682 /* adjust for the bottom gutter */
3683 if (window_is_lowest (w))
3684 dl->ypos -= FRAME_BOTTOM_GUTTER_BOUNDS (f);
3685 }
3686
3692 static Charcount 3687 static Charcount
3693 add_string_to_fstring_db_runes (pos_data *data, CONST Bufbyte *str, 3688 add_string_to_fstring_db_runes (pos_data *data, CONST Bufbyte *str,
3694 Charcount pos, Charcount min_pos, Charcount max_pos) 3689 Charcount pos, Charcount min_pos, Charcount max_pos)
3695 { 3690 {
3696 /* This function has been Mule-ized. */ 3691 /* This function has been Mule-ized. */
3732 3727
3733 /* #### Urk! Should also handle begin-glyphs and end-glyphs in 3728 /* #### Urk! Should also handle begin-glyphs and end-glyphs in
3734 modeline extents. */ 3729 modeline extents. */
3735 static Charcount 3730 static Charcount
3736 add_glyph_to_fstring_db_runes (pos_data *data, Lisp_Object glyph, 3731 add_glyph_to_fstring_db_runes (pos_data *data, Lisp_Object glyph,
3737 Charcount pos, Charcount min_pos, Charcount max_pos) 3732 Charcount pos, Charcount min_pos,
3733 Charcount max_pos, Lisp_Object extent)
3738 { 3734 {
3739 /* This function has been Mule-ized. */ 3735 /* This function has been Mule-ized. */
3740 Charcount end; 3736 Charcount end;
3741 struct display_block *db = data->db; 3737 struct display_block *db = data->db;
3742 struct glyph_block gb; 3738 struct glyph_block gb;
3748 end = Dynarr_length (db->runes) + 1; 3744 end = Dynarr_length (db->runes) + 1;
3749 if (max_pos != -1) 3745 if (max_pos != -1)
3750 end = min (max_pos, end); 3746 end = min (max_pos, end);
3751 3747
3752 gb.glyph = glyph; 3748 gb.glyph = glyph;
3753 gb.extent = Qnil; 3749 gb.extent = extent;
3754 add_glyph_rune (data, &gb, BEGIN_GLYPHS, 0, 0); 3750 add_glyph_rune (data, &gb, BEGIN_GLYPHS, 0, 0);
3755 pos++; 3751 pos++;
3756 3752
3757 while (Dynarr_length (db->runes) < pos && 3753 while (Dynarr_length (db->runes) < pos &&
3758 (data->pixpos + data->blank_width <= data->max_pixpos)) 3754 (data->pixpos + data->blank_width <= data->max_pixpos))
3775 modeline. */ 3771 modeline. */
3776 static Charcount 3772 static Charcount
3777 generate_fstring_runes (struct window *w, pos_data *data, Charcount pos, 3773 generate_fstring_runes (struct window *w, pos_data *data, Charcount pos,
3778 Charcount min_pos, Charcount max_pos, 3774 Charcount min_pos, Charcount max_pos,
3779 Lisp_Object elt, int depth, int max_pixsize, 3775 Lisp_Object elt, int depth, int max_pixsize,
3780 face_index findex, int type) 3776 face_index findex, int type, Charcount *offset,
3777 Lisp_Object cur_ext)
3781 { 3778 {
3782 /* This function has been Mule-ized. */ 3779 /* This function has been Mule-ized. */
3783 /* #### The other losing things in this function are: 3780 /* #### The other losing things in this function are:
3784 3781
3785 -- C zero-terminated-string lossage. 3782 -- C zero-terminated-string lossage.
3807 while (*this && *this != '%') 3804 while (*this && *this != '%')
3808 this++; 3805 this++;
3809 3806
3810 if (this != last) 3807 if (this != last)
3811 { 3808 {
3812 /* The string is just a string. */ 3809 /* No %-construct */
3813 Charcount size = 3810 Charcount size =
3814 bytecount_to_charcount (last, this - last) + pos; 3811 bytecount_to_charcount (last, this - last);
3815 Charcount tmp_max = (max_pos == -1 ? size : min (size, max_pos)); 3812
3816 3813 if (size <= *offset)
3817 pos = add_string_to_fstring_db_runes (data, last, pos, pos, 3814 *offset -= size;
3818 tmp_max); 3815 else
3816 {
3817 Charcount tmp_max = (max_pos == -1 ? pos + size - *offset :
3818 min (pos + size - *offset, max_pos));
3819 CONST Bufbyte *tmp_last = charptr_n_addr (last, *offset);
3820
3821 pos = add_string_to_fstring_db_runes (data, tmp_last,
3822 pos, pos, tmp_max);
3823 *offset = 0;
3824 }
3819 } 3825 }
3820 else /* *this == '%' */ 3826 else /* *this == '%' */
3821 { 3827 {
3822 Charcount spec_width = 0; 3828 Charcount spec_width = 0;
3823 3829
3838 if (*this == 'M') 3844 if (*this == 'M')
3839 { 3845 {
3840 pos = generate_fstring_runes (w, data, pos, spec_width, 3846 pos = generate_fstring_runes (w, data, pos, spec_width,
3841 max_pos, Vglobal_mode_string, 3847 max_pos, Vglobal_mode_string,
3842 depth, max_pixsize, findex, 3848 depth, max_pixsize, findex,
3843 type); 3849 type, offset, cur_ext);
3844 } 3850 }
3845 else if (*this == '-') 3851 else if (*this == '-')
3846 { 3852 {
3847 Charcount num_to_add; 3853 Charcount num_to_add;
3848 3854
3869 pos = add_string_to_fstring_db_runes 3875 pos = add_string_to_fstring_db_runes
3870 (data, (CONST Bufbyte *) "-", pos, pos, max_pos); 3876 (data, (CONST Bufbyte *) "-", pos, pos, max_pos);
3871 } 3877 }
3872 else if (*this != 0) 3878 else if (*this != 0)
3873 { 3879 {
3880 Emchar ch = charptr_emchar (this);
3874 Bufbyte *str; 3881 Bufbyte *str;
3875 Emchar ch = charptr_emchar (this); 3882 Charcount size;
3883
3876 decode_mode_spec (w, ch, type); 3884 decode_mode_spec (w, ch, type);
3877 3885
3878 str = Dynarr_atp (mode_spec_bufbyte_string, 0); 3886 str = Dynarr_atp (mode_spec_bufbyte_string, 0);
3879 pos = add_string_to_fstring_db_runes (data,str, pos, pos, 3887 size = bytecount_to_charcount
3880 max_pos); 3888 /* Skip the null character added by `decode_mode_spec' */
3889 (str, Dynarr_length (mode_spec_bufbyte_string)) - 1;
3890
3891 if (size <= *offset)
3892 *offset -= size;
3893 else
3894 {
3895 CONST Bufbyte *tmp_str = charptr_n_addr (str, *offset);
3896
3897 /* ### NOTE: I don't understand why a tmp_max is not
3898 computed and used here as in the plain string case
3899 above. -- dv */
3900 pos = add_string_to_fstring_db_runes (data, tmp_str,
3901 pos, pos,
3902 max_pos);
3903 *offset = 0;
3904 }
3881 } 3905 }
3882 3906
3883 /* NOT this++. There could be any sort of character at 3907 /* NOT this++. There could be any sort of character at
3884 the current position. */ 3908 the current position. */
3885 INC_CHARPTR (this); 3909 INC_CHARPTR (this);
3901 as if it appeared here directly. */ 3925 as if it appeared here directly. */
3902 Lisp_Object tem = symbol_value_in_buffer (elt, w->buffer); 3926 Lisp_Object tem = symbol_value_in_buffer (elt, w->buffer);
3903 3927
3904 if (!UNBOUNDP (tem)) 3928 if (!UNBOUNDP (tem))
3905 { 3929 {
3906 /* If value is a string, output that string literally: 3930 /* If value is a string, output that string literally:
3907 don't check for % within it. */ 3931 don't check for % within it. */
3908 if (STRINGP (tem)) 3932 if (STRINGP (tem))
3909 { 3933 {
3910 pos = 3934 Bufbyte *str = XSTRING_DATA (tem);
3911 add_string_to_fstring_db_runes 3935 Charcount size = XSTRING_CHAR_LENGTH (tem);
3912 (data, XSTRING_DATA (tem), pos, min_pos, max_pos); 3936
3937 if (size <= *offset)
3938 *offset -= size;
3939 else
3940 {
3941 CONST Bufbyte *tmp_str = charptr_n_addr (str, *offset);
3942
3943 /* ### NOTE: I don't understand why a tmp_max is not
3944 computed and used here as in the plain string case
3945 above. -- dv */
3946 pos = add_string_to_fstring_db_runes (data, tmp_str, pos,
3947 min_pos, max_pos);
3948 *offset = 0;
3949 }
3913 } 3950 }
3914 /* Give up right away for nil or t. */ 3951 /* Give up right away for nil or t. */
3915 else if (!EQ (tem, elt)) 3952 else if (!EQ (tem, elt))
3916 { 3953 {
3917 elt = tem; 3954 elt = tem;
3932 } 3969 }
3933 } 3970 }
3934 else if (CONSP (elt)) 3971 else if (CONSP (elt))
3935 { 3972 {
3936 /* A cons cell: four distinct cases. 3973 /* A cons cell: four distinct cases.
3937 * If first element is a string or a cons, process all the elements 3974 * - If first element is a string or a cons, process all the elements
3938 * and effectively concatenate them. 3975 * and effectively concatenate them.
3939 * If first element is a negative number, truncate displaying cdr to 3976 * - If first element is a negative number, truncate displaying cdr to
3940 * at most that many characters. If positive, pad (with spaces) 3977 * at most that many characters. If positive, pad (with spaces)
3941 * to at least that many characters. 3978 * to at least that many characters.
3942 * If first element is a symbol, process the cadr or caddr recursively 3979 * - If first element is another symbol, process the cadr or caddr
3943 * according to whether the symbol's value is non-nil or nil. 3980 * recursively according to whether the symbol's value is non-nil or
3944 * If first element is a face, process the cdr recursively 3981 * nil.
3945 * without altering the depth. 3982 * - If first element is a face, process the cdr recursively
3983 * without altering the depth.
3946 */ 3984 */
3985
3947 Lisp_Object car, tem; 3986 Lisp_Object car, tem;
3948 3987
3949 car = XCAR (elt); 3988 car = XCAR (elt);
3950 if (SYMBOLP (car)) 3989 if (SYMBOLP (car))
3951 { 3990 {
3952 elt = XCDR (elt); 3991 elt = XCDR (elt);
3953 if (!CONSP (elt)) 3992 if (!CONSP (elt))
3954 goto invalid; 3993 goto invalid;
3955 tem = symbol_value_in_buffer (car, w->buffer); 3994
3956 /* elt is now the cdr, and we know it is a cons cell. 3995 tem = symbol_value_in_buffer (car, w->buffer);
3957 Use its car if CAR has a non-nil value. */ 3996 /* elt is now the cdr, and we know it is a cons cell.
3958 if (!UNBOUNDP (tem)) 3997 Use its car if CAR has a non-nil value. */
3959 { 3998 if (!UNBOUNDP (tem))
3960 if (!NILP (tem)) 3999 {
3961 { 4000 if (!NILP (tem))
3962 elt = XCAR (elt); 4001 {
3963 goto tail_recurse; 4002 elt = XCAR (elt);
3964 } 4003 goto tail_recurse;
3965 } 4004 }
3966 /* Symbol's value is nil (or symbol is unbound) 4005 }
3967 * Get the cddr of the original list 4006 /* Symbol's value is nil (or symbol is unbound)
3968 * and if possible find the caddr and use that. 4007 * Get the cddr of the original list
3969 */ 4008 * and if possible find the caddr and use that.
3970 elt = XCDR (elt); 4009 */
3971 if (NILP (elt)) 4010 elt = XCDR (elt);
3972 ; 4011 if (NILP (elt))
3973 else if (!CONSP (elt)) 4012 ;
3974 goto invalid; 4013 else if (!CONSP (elt))
3975 else 4014 goto invalid;
3976 { 4015 else
3977 elt = XCAR (elt); 4016 {
3978 goto tail_recurse; 4017 elt = XCAR (elt);
3979 } 4018 goto tail_recurse;
3980 } 4019 }
4020 }
3981 else if (INTP (car)) 4021 else if (INTP (car))
3982 { 4022 {
3983 Charcount lim = XINT (car); 4023 Charcount lim = XINT (car);
3984 4024
3985 elt = XCDR (elt); 4025 elt = XCDR (elt);
4014 goto tail_recurse; 4054 goto tail_recurse;
4015 } 4055 }
4016 else if (STRINGP (car) || CONSP (car)) 4056 else if (STRINGP (car) || CONSP (car))
4017 { 4057 {
4018 int limit = 50; 4058 int limit = 50;
4059
4019 /* LIMIT is to protect against circular lists. */ 4060 /* LIMIT is to protect against circular lists. */
4020 while (CONSP (elt) && --limit > 0 4061 while (CONSP (elt) && --limit > 0
4021 && (pos < max_pos || max_pos == -1)) 4062 && (pos < max_pos || max_pos == -1))
4022 { 4063 {
4023 pos = generate_fstring_runes (w, data, pos, pos, max_pos, 4064 pos = generate_fstring_runes (w, data, pos, pos, max_pos,
4024 XCAR (elt), depth, 4065 XCAR (elt), depth, max_pixsize,
4025 max_pixsize, findex, type); 4066 findex, type, offset, cur_ext);
4026 elt = XCDR (elt); 4067 elt = XCDR (elt);
4027 } 4068 }
4028 } 4069 }
4029 else if (EXTENTP (car)) 4070 else if (EXTENTP (car))
4030 { 4071 {
4059 new_findex = old_findex; 4100 new_findex = old_findex;
4060 4101
4061 data->findex = new_findex; 4102 data->findex = new_findex;
4062 pos = generate_fstring_runes (w, data, pos, pos, max_pos, 4103 pos = generate_fstring_runes (w, data, pos, pos, max_pos,
4063 XCDR (elt), depth - 1, 4104 XCDR (elt), depth - 1,
4064 max_pixsize, new_findex, type); 4105 max_pixsize, new_findex, type,
4106 offset, car);
4065 data->findex = old_findex; 4107 data->findex = old_findex;
4066 Dynarr_add (formatted_string_extent_dynarr, ext); 4108 Dynarr_add (formatted_string_extent_dynarr, ext);
4067 Dynarr_add (formatted_string_extent_start_dynarr, start); 4109 Dynarr_add (formatted_string_extent_start_dynarr, start);
4068 Dynarr_add (formatted_string_extent_end_dynarr, data->bytepos); 4110 Dynarr_add (formatted_string_extent_end_dynarr, data->bytepos);
4069 } 4111 }
4070 } 4112 }
4071 } 4113 }
4072 else if (GLYPHP (elt)) 4114 else if (GLYPHP (elt))
4073 { 4115 {
4074 pos = add_glyph_to_fstring_db_runes (data, elt, pos, pos, max_pos); 4116 /* Glyphs are considered as one character with respect to the modeline
4117 horizontal scrolling facility. -- dv */
4118 if (*offset > 0)
4119 *offset -= 1;
4120 else
4121 pos = add_glyph_to_fstring_db_runes (data, elt, pos, pos, max_pos,
4122 cur_ext);
4075 } 4123 }
4076 else 4124 else
4077 { 4125 {
4078 invalid: 4126 invalid:
4079 pos = 4127 {
4080 add_string_to_fstring_db_runes 4128 char *str = GETTEXT ("*invalid*");
4081 (data, (CONST Bufbyte *) GETTEXT ("*invalid*"), pos, min_pos, 4129 Charcount size = (Charcount) strlen (str); /* is this ok ?? -- dv */
4082 max_pos); 4130
4131 if (size <= *offset)
4132 *offset -= size;
4133 else
4134 {
4135 CONST Bufbyte *tmp_str =
4136 charptr_n_addr ((CONST Bufbyte *) str, *offset);
4137
4138 /* ### NOTE: I don't understand why a tmp_max is not computed and
4139 used here as in the plain string case above. -- dv */
4140 pos = add_string_to_fstring_db_runes (data, tmp_str, pos,
4141 min_pos, max_pos);
4142 *offset = 0;
4143 }
4144 }
4083 } 4145 }
4084 4146
4085 if (min_pos > pos) 4147 if (min_pos > pos)
4086 { 4148 {
4087 add_string_to_fstring_db_runes (data, (CONST Bufbyte *) "", pos, min_pos, 4149 add_string_to_fstring_db_runes (data, (CONST Bufbyte *) "", pos,
4088 -1); 4150 min_pos, -1);
4089 } 4151 }
4090 4152
4091 return pos; 4153 return pos;
4092 }
4093
4094 /* The caller is responsible for freeing the returned string. */
4095 Bufbyte *
4096 generate_formatted_string (struct window *w, Lisp_Object format_str,
4097 Lisp_Object result_str, face_index findex, int type)
4098 {
4099 struct display_line *dl;
4100 struct display_block *db;
4101 int elt = 0;
4102
4103 dl = &formatted_string_display_line;
4104 db = get_display_block_from_line (dl, TEXT);
4105 Dynarr_reset (db->runes);
4106
4107 generate_formatted_string_db (format_str, result_str, w, dl, db, findex, 0,
4108 -1, type);
4109
4110 Dynarr_reset (formatted_string_emchar_dynarr);
4111 while (elt < Dynarr_length (db->runes))
4112 {
4113 if (Dynarr_atp (db->runes, elt)->type == RUNE_CHAR)
4114 Dynarr_add (formatted_string_emchar_dynarr,
4115 Dynarr_atp (db->runes, elt)->object.chr.ch);
4116 elt++;
4117 }
4118
4119 return
4120 convert_emchar_string_into_malloced_string
4121 ( Dynarr_atp (formatted_string_emchar_dynarr, 0),
4122 Dynarr_length (formatted_string_emchar_dynarr), 0);
4123 } 4154 }
4124 4155
4125 /* Update just the modeline. Assumes the desired display structs. If 4156 /* Update just the modeline. Assumes the desired display structs. If
4126 they do not have a modeline block, it does nothing. */ 4157 they do not have a modeline block, it does nothing. */
4127 static void 4158 static void
6162 6193
6163 /* #### This should be dependent on face changes and will need to be 6194 /* #### This should be dependent on face changes and will need to be
6164 somewhere else once tty updates occur on a per-frame basis. */ 6195 somewhere else once tty updates occur on a per-frame basis. */
6165 mark_face_cachels_as_clean (w); 6196 mark_face_cachels_as_clean (w);
6166 6197
6167 /* The glyph cachels only get dirty if someone changed something. */ 6198 /* The glyph cachels only get dirty if someone changed something.
6199 Since redisplay has now effectively ended we can reset the dirty
6200 flag since everything must be up-to-date. */
6168 if (glyphs_changed) 6201 if (glyphs_changed)
6169 mark_glyph_cachels_as_clean (w); 6202 mark_glyph_cachels_as_clean (w);
6170 6203
6171 w->windows_changed = 0; 6204 w->windows_changed = 0;
6172 } 6205 }
9092 if (!initialized) 9125 if (!initialized)
9093 #endif 9126 #endif
9094 { 9127 {
9095 cmotion_display_lines = Dynarr_new (display_line); 9128 cmotion_display_lines = Dynarr_new (display_line);
9096 mode_spec_bufbyte_string = Dynarr_new (Bufbyte); 9129 mode_spec_bufbyte_string = Dynarr_new (Bufbyte);
9097 formatted_string_emchar_dynarr = Dynarr_new (Emchar);
9098 formatted_string_extent_dynarr = Dynarr_new (EXTENT); 9130 formatted_string_extent_dynarr = Dynarr_new (EXTENT);
9099 formatted_string_extent_start_dynarr = Dynarr_new (Bytecount); 9131 formatted_string_extent_start_dynarr = Dynarr_new (Bytecount);
9100 formatted_string_extent_end_dynarr = Dynarr_new (Bytecount); 9132 formatted_string_extent_end_dynarr = Dynarr_new (Bytecount);
9101 internal_cache = Dynarr_new (line_start_cache); 9133 internal_cache = Dynarr_new (line_start_cache);
9102 xzero (formatted_string_display_line);
9103 } 9134 }
9104 9135
9105 /* window system is nil when in -batch mode */ 9136 /* window system is nil when in -batch mode */
9106 if (!initialized || noninteractive) 9137 if (!initialized || noninteractive)
9107 return; 9138 return;
9381 This is a specifier; use `set-specifier' to change it. 9412 This is a specifier; use `set-specifier' to change it.
9382 */ ); 9413 */ );
9383 Vleft_margin_width = Fmake_specifier (Qnatnum); 9414 Vleft_margin_width = Fmake_specifier (Qnatnum);
9384 set_specifier_fallback (Vleft_margin_width, list1 (Fcons (Qnil, Qzero))); 9415 set_specifier_fallback (Vleft_margin_width, list1 (Fcons (Qnil, Qzero)));
9385 set_specifier_caching (Vleft_margin_width, 9416 set_specifier_caching (Vleft_margin_width,
9386 slot_offset (struct window, left_margin_width), 9417 offsetof (struct window, left_margin_width),
9387 some_window_value_changed, 9418 some_window_value_changed,
9388 slot_offset (struct frame, left_margin_width), 9419 offsetof (struct frame, left_margin_width),
9389 margin_width_changed_in_frame); 9420 margin_width_changed_in_frame);
9390 9421
9391 DEFVAR_SPECIFIER ("right-margin-width", &Vright_margin_width /* 9422 DEFVAR_SPECIFIER ("right-margin-width", &Vright_margin_width /*
9392 *Width of right margin. 9423 *Width of right margin.
9393 This is a specifier; use `set-specifier' to change it. 9424 This is a specifier; use `set-specifier' to change it.
9394 */ ); 9425 */ );
9395 Vright_margin_width = Fmake_specifier (Qnatnum); 9426 Vright_margin_width = Fmake_specifier (Qnatnum);
9396 set_specifier_fallback (Vright_margin_width, list1 (Fcons (Qnil, Qzero))); 9427 set_specifier_fallback (Vright_margin_width, list1 (Fcons (Qnil, Qzero)));
9397 set_specifier_caching (Vright_margin_width, 9428 set_specifier_caching (Vright_margin_width,
9398 slot_offset (struct window, right_margin_width), 9429 offsetof (struct window, right_margin_width),
9399 some_window_value_changed, 9430 some_window_value_changed,
9400 slot_offset (struct frame, right_margin_width), 9431 offsetof (struct frame, right_margin_width),
9401 margin_width_changed_in_frame); 9432 margin_width_changed_in_frame);
9402 9433
9403 DEFVAR_SPECIFIER ("minimum-line-ascent", &Vminimum_line_ascent /* 9434 DEFVAR_SPECIFIER ("minimum-line-ascent", &Vminimum_line_ascent /*
9404 *Minimum ascent height of lines. 9435 *Minimum ascent height of lines.
9405 This is a specifier; use `set-specifier' to change it. 9436 This is a specifier; use `set-specifier' to change it.
9406 */ ); 9437 */ );
9407 Vminimum_line_ascent = Fmake_specifier (Qnatnum); 9438 Vminimum_line_ascent = Fmake_specifier (Qnatnum);
9408 set_specifier_fallback (Vminimum_line_ascent, list1 (Fcons (Qnil, Qzero))); 9439 set_specifier_fallback (Vminimum_line_ascent, list1 (Fcons (Qnil, Qzero)));
9409 set_specifier_caching (Vminimum_line_ascent, 9440 set_specifier_caching (Vminimum_line_ascent,
9410 slot_offset (struct window, minimum_line_ascent), 9441 offsetof (struct window, minimum_line_ascent),
9411 some_window_value_changed, 9442 some_window_value_changed,
9412 0, 0); 9443 0, 0);
9413 9444
9414 DEFVAR_SPECIFIER ("minimum-line-descent", &Vminimum_line_descent /* 9445 DEFVAR_SPECIFIER ("minimum-line-descent", &Vminimum_line_descent /*
9415 *Minimum descent height of lines. 9446 *Minimum descent height of lines.
9416 This is a specifier; use `set-specifier' to change it. 9447 This is a specifier; use `set-specifier' to change it.
9417 */ ); 9448 */ );
9418 Vminimum_line_descent = Fmake_specifier (Qnatnum); 9449 Vminimum_line_descent = Fmake_specifier (Qnatnum);
9419 set_specifier_fallback (Vminimum_line_descent, list1 (Fcons (Qnil, Qzero))); 9450 set_specifier_fallback (Vminimum_line_descent, list1 (Fcons (Qnil, Qzero)));
9420 set_specifier_caching (Vminimum_line_descent, 9451 set_specifier_caching (Vminimum_line_descent,
9421 slot_offset (struct window, minimum_line_descent), 9452 offsetof (struct window, minimum_line_descent),
9422 some_window_value_changed, 9453 some_window_value_changed,
9423 0, 0); 9454 0, 0);
9424 9455
9425 DEFVAR_SPECIFIER ("use-left-overflow", &Vuse_left_overflow /* 9456 DEFVAR_SPECIFIER ("use-left-overflow", &Vuse_left_overflow /*
9426 *Non-nil means use the left outside margin as extra whitespace when 9457 *Non-nil means use the left outside margin as extra whitespace when
9428 This is a specifier; use `set-specifier' to change it. 9459 This is a specifier; use `set-specifier' to change it.
9429 */ ); 9460 */ );
9430 Vuse_left_overflow = Fmake_specifier (Qboolean); 9461 Vuse_left_overflow = Fmake_specifier (Qboolean);
9431 set_specifier_fallback (Vuse_left_overflow, list1 (Fcons (Qnil, Qnil))); 9462 set_specifier_fallback (Vuse_left_overflow, list1 (Fcons (Qnil, Qnil)));
9432 set_specifier_caching (Vuse_left_overflow, 9463 set_specifier_caching (Vuse_left_overflow,
9433 slot_offset (struct window, use_left_overflow), 9464 offsetof (struct window, use_left_overflow),
9434 some_window_value_changed, 9465 some_window_value_changed,
9435 0, 0); 9466 0, 0);
9436 9467
9437 DEFVAR_SPECIFIER ("use-right-overflow", &Vuse_right_overflow /* 9468 DEFVAR_SPECIFIER ("use-right-overflow", &Vuse_right_overflow /*
9438 *Non-nil means use the right outside margin as extra whitespace when 9469 *Non-nil means use the right outside margin as extra whitespace when
9440 This is a specifier; use `set-specifier' to change it. 9471 This is a specifier; use `set-specifier' to change it.
9441 */ ); 9472 */ );
9442 Vuse_right_overflow = Fmake_specifier (Qboolean); 9473 Vuse_right_overflow = Fmake_specifier (Qboolean);
9443 set_specifier_fallback (Vuse_right_overflow, list1 (Fcons (Qnil, Qnil))); 9474 set_specifier_fallback (Vuse_right_overflow, list1 (Fcons (Qnil, Qnil)));
9444 set_specifier_caching (Vuse_right_overflow, 9475 set_specifier_caching (Vuse_right_overflow,
9445 slot_offset (struct window, use_right_overflow), 9476 offsetof (struct window, use_right_overflow),
9446 some_window_value_changed, 9477 some_window_value_changed,
9447 0, 0); 9478 0, 0);
9448 9479
9449 DEFVAR_SPECIFIER ("text-cursor-visible-p", &Vtext_cursor_visible_p /* 9480 DEFVAR_SPECIFIER ("text-cursor-visible-p", &Vtext_cursor_visible_p /*
9450 *Non-nil means the text cursor is visible (this is usually the case). 9481 *Non-nil means the text cursor is visible (this is usually the case).
9451 This is a specifier; use `set-specifier' to change it. 9482 This is a specifier; use `set-specifier' to change it.
9452 */ ); 9483 */ );
9453 Vtext_cursor_visible_p = Fmake_specifier (Qboolean); 9484 Vtext_cursor_visible_p = Fmake_specifier (Qboolean);
9454 set_specifier_fallback (Vtext_cursor_visible_p, list1 (Fcons (Qnil, Qt))); 9485 set_specifier_fallback (Vtext_cursor_visible_p, list1 (Fcons (Qnil, Qt)));
9455 set_specifier_caching (Vtext_cursor_visible_p, 9486 set_specifier_caching (Vtext_cursor_visible_p,
9456 slot_offset (struct window, text_cursor_visible_p), 9487 offsetof (struct window, text_cursor_visible_p),
9457 text_cursor_visible_p_changed, 9488 text_cursor_visible_p_changed,
9458 0, 0); 9489 0, 0);
9459 9490
9460 } 9491 }