comparison src/redisplay.c @ 274:ca9a9ec9c1c1 r21-0b35

Import from CVS: tag r21-0b35
author cvs
date Mon, 13 Aug 2007 10:29:42 +0200
parents c5d627a313b1
children 6330739388db
comparison
equal deleted inserted replaced
273:411aac7253ef 274:ca9a9ec9c1c1
3919 { 3919 {
3920 elt = tem; 3920 elt = tem;
3921 goto tail_recurse; 3921 goto tail_recurse;
3922 } 3922 }
3923 } 3923 }
3924 }
3925 else if (GENERIC_SPECIFIERP (elt))
3926 {
3927 Lisp_Object window, tem;
3928 XSETWINDOW (window, w);
3929 tem = specifier_instance_no_quit (elt, Qunbound, window,
3930 ERROR_ME_NOT, 0, Qzero);
3931 if (!UNBOUNDP (tem))
3932 {
3933 elt = tem;
3934 goto tail_recurse;
3935 }
3924 } 3936 }
3925 else if (CONSP (elt)) 3937 else if (CONSP (elt))
3926 { 3938 {
3927 /* A cons cell: four distinct cases. 3939 /* A cons cell: four distinct cases.
3928 * If first element is a string or a cons, process all the elements 3940 * If first element is a string or a cons, process all the elements
4082 0, /* no limit */ 1); 4094 0, /* no limit */ 1);
4083 } 4095 }
4084 4096
4085 return pos; 4097 return pos;
4086 } 4098 }
4087 #else /* MODELINE_IS_SCROLLABLE */ 4099 #else /* not MODELINE_IS_SCROLLABLE */
4088 static void 4100 static void
4089 generate_formatted_string_db (Lisp_Object format_str, Lisp_Object result_str, 4101 generate_formatted_string_db (Lisp_Object format_str, Lisp_Object result_str,
4090 struct window *w, struct display_line *dl, 4102 struct window *w, struct display_line *dl,
4091 struct display_block *db, face_index findex, 4103 struct display_block *db, face_index findex,
4092 int min_pixpos, int max_pixpos, int type) 4104 int min_pixpos, int max_pixpos, int type)
4415 { 4427 {
4416 elt = tem; 4428 elt = tem;
4417 goto tail_recurse; 4429 goto tail_recurse;
4418 } 4430 }
4419 } 4431 }
4432 }
4433 else if (GENERIC_SPECIFIERP (elt))
4434 {
4435 Lisp_Object window, tem;
4436 XSETWINDOW (window, w);
4437 tem = specifier_instance_no_quit (elt, Qunbound, window,
4438 ERROR_ME_NOT, 0, Qzero);
4439 if (!UNBOUNDP (tem))
4440 {
4441 elt = tem;
4442 goto tail_recurse;
4443 }
4420 } 4444 }
4421 else if (CONSP (elt)) 4445 else if (CONSP (elt))
4422 { 4446 {
4423 /* A cons cell: four distinct cases. 4447 /* A cons cell: four distinct cases.
4424 * If first element is a string or a cons, process all the elements 4448 * If first element is a string or a cons, process all the elements
5721 } 5745 }
5722 5746
5723 /* We still haven't gotten the window regenerated with point 5747 /* We still haven't gotten the window regenerated with point
5724 visible. Next we try scrolling a little and see if point comes 5748 visible. Next we try scrolling a little and see if point comes
5725 back onto the screen. */ 5749 back onto the screen. */
5726 if (scroll_step) 5750 if (scroll_step > 0)
5727 { 5751 {
5728 int scrolled = scroll_conservatively; 5752 int scrolled = scroll_conservatively;
5729 for (; scrolled >= 0; scrolled -= scroll_step) 5753 for (; scrolled >= 0; scrolled -= scroll_step)
5730 { 5754 {
5731 startp = vmotion (w, startp, 5755 startp = vmotion (w, startp,
6240 : marker_position (w->pointm[type])); 6264 : marker_position (w->pointm[type]));
6241 EMACS_INT line; 6265 EMACS_INT line;
6242 6266
6243 line = buffer_line_number (b, pos, 1); 6267 line = buffer_line_number (b, pos, 1);
6244 6268
6245 sprintf (window_line_number_buf, "%d", line + 1); 6269 sprintf (window_line_number_buf, "%ld", (long)(line + 1));
6246 6270
6247 return window_line_number_buf; 6271 return window_line_number_buf;
6248 } 6272 }
6249 6273
6250 6274