Mercurial > emacs
comparison src/xdisp.c @ 36949:88b92b222846
(init_iterator): Check WINDOWP before using XWINDOW.
(string_buffer_position): Use `make_number'.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Fri, 23 Mar 2001 04:24:29 +0000 |
parents | 95997b31956c |
children | 7c4fe2f11e23 |
comparison
equal
deleted
inserted
replaced
36948:fabff5d240fb | 36949:88b92b222846 |
---|---|
1522 /* Or show region in the selected window. */ | 1522 /* Or show region in the selected window. */ |
1523 || w == XWINDOW (selected_window) | 1523 || w == XWINDOW (selected_window) |
1524 /* Or show the region if we are in the mini-buffer and W is | 1524 /* Or show the region if we are in the mini-buffer and W is |
1525 the window the mini-buffer refers to. */ | 1525 the window the mini-buffer refers to. */ |
1526 || (MINI_WINDOW_P (XWINDOW (selected_window)) | 1526 || (MINI_WINDOW_P (XWINDOW (selected_window)) |
1527 && WINDOWP (Vminibuf_scroll_window) | |
1527 && w == XWINDOW (Vminibuf_scroll_window)))) | 1528 && w == XWINDOW (Vminibuf_scroll_window)))) |
1528 { | 1529 { |
1529 int charpos = marker_position (current_buffer->mark); | 1530 int charpos = marker_position (current_buffer->mark); |
1530 it->region_beg_charpos = min (PT, charpos); | 1531 it->region_beg_charpos = min (PT, charpos); |
1531 it->region_end_charpos = max (PT, charpos); | 1532 it->region_end_charpos = max (PT, charpos); |
3091 Lisp_Object around = make_number (around_charpos); | 3092 Lisp_Object around = make_number (around_charpos); |
3092 Lisp_Object limit, prop, pos; | 3093 Lisp_Object limit, prop, pos; |
3093 const int MAX_DISTANCE = 1000; | 3094 const int MAX_DISTANCE = 1000; |
3094 int found = 0; | 3095 int found = 0; |
3095 | 3096 |
3096 pos = around_charpos; | 3097 pos = make_number (around_charpos); |
3097 limit = make_number (min (XINT (pos) + MAX_DISTANCE, ZV)); | 3098 limit = make_number (min (XINT (pos) + MAX_DISTANCE, ZV)); |
3098 while (!found && !EQ (pos, limit)) | 3099 while (!found && !EQ (pos, limit)) |
3099 { | 3100 { |
3100 prop = Fget_char_property (pos, Qdisplay, Qnil); | 3101 prop = Fget_char_property (pos, Qdisplay, Qnil); |
3101 if (!NILP (prop) && display_prop_string_p (prop, string)) | 3102 if (!NILP (prop) && display_prop_string_p (prop, string)) |
3104 pos = Fnext_single_property_change (pos, Qdisplay, Qnil, limit); | 3105 pos = Fnext_single_property_change (pos, Qdisplay, Qnil, limit); |
3105 } | 3106 } |
3106 | 3107 |
3107 if (!found) | 3108 if (!found) |
3108 { | 3109 { |
3109 pos = around_charpos; | 3110 pos = make_number (around_charpos); |
3110 limit = make_number (max (XINT (pos) - MAX_DISTANCE, BEGV)); | 3111 limit = make_number (max (XINT (pos) - MAX_DISTANCE, BEGV)); |
3111 while (!found && !EQ (pos, limit)) | 3112 while (!found && !EQ (pos, limit)) |
3112 { | 3113 { |
3113 prop = Fget_char_property (pos, Qdisplay, Qnil); | 3114 prop = Fget_char_property (pos, Qdisplay, Qnil); |
3114 if (!NILP (prop) && display_prop_string_p (prop, string)) | 3115 if (!NILP (prop) && display_prop_string_p (prop, string)) |