Mercurial > emacs
comparison src/xdisp.c @ 17698:d9ba96fed821
(mark_window_display_accurate, redisplay_internal):
Test highlight_nonselected_windows.
(display_text_line): Likewise (in more places).
(syms_of_xdisp): Initialize highlight_nonselected_windows to 0.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 08 May 1997 05:48:01 +0000 |
parents | 447ca1b334e5 |
children | c427501449a1 |
comparison
equal
deleted
inserted
replaced
17697:8ef3e5ff7ee2 | 17698:d9ba96fed821 |
---|---|
1084 } | 1084 } |
1085 /* If highlighting the region, or if the cursor is in the echo area, | 1085 /* If highlighting the region, or if the cursor is in the echo area, |
1086 then we can't just move the cursor. */ | 1086 then we can't just move the cursor. */ |
1087 else if (! (!NILP (Vtransient_mark_mode) | 1087 else if (! (!NILP (Vtransient_mark_mode) |
1088 && !NILP (current_buffer->mark_active)) | 1088 && !NILP (current_buffer->mark_active)) |
1089 && w == XWINDOW (current_buffer->last_selected_window) | 1089 && (w == XWINDOW (current_buffer->last_selected_window) |
1090 || highlight_nonselected_windows) | |
1090 && NILP (w->region_showing) | 1091 && NILP (w->region_showing) |
1091 && !cursor_in_echo_area) | 1092 && !cursor_in_echo_area) |
1092 { | 1093 { |
1093 pos = *compute_motion (tlbufpos, 0, | 1094 pos = *compute_motion (tlbufpos, 0, |
1094 XINT (w->hscroll) ? 1 - XINT (w->hscroll) : 0, | 1095 XINT (w->hscroll) ? 1 - XINT (w->hscroll) : 0, |
1272 ? Qt : Qnil); | 1273 ? Qt : Qnil); |
1273 | 1274 |
1274 /* Record if we are showing a region, so can make sure to | 1275 /* Record if we are showing a region, so can make sure to |
1275 update it fully at next redisplay. */ | 1276 update it fully at next redisplay. */ |
1276 w->region_showing = (!NILP (Vtransient_mark_mode) | 1277 w->region_showing = (!NILP (Vtransient_mark_mode) |
1277 && w == XWINDOW (current_buffer->last_selected_window) | 1278 && (w == XWINDOW (current_buffer->last_selected_window) |
1279 || highlight_nonselected_windows) | |
1278 && !NILP (XBUFFER (w->buffer)->mark_active) | 1280 && !NILP (XBUFFER (w->buffer)->mark_active) |
1279 ? Fmarker_position (XBUFFER (w->buffer)->mark) | 1281 ? Fmarker_position (XBUFFER (w->buffer)->mark) |
1280 : Qnil); | 1282 : Qnil); |
1281 | 1283 |
1282 w->window_end_valid = w->buffer; | 1284 w->window_end_valid = w->buffer; |
1354 ? Qt : Qnil); | 1356 ? Qt : Qnil); |
1355 | 1357 |
1356 /* Record if we are showing a region, so can make sure to | 1358 /* Record if we are showing a region, so can make sure to |
1357 update it fully at next redisplay. */ | 1359 update it fully at next redisplay. */ |
1358 w->region_showing = (!NILP (Vtransient_mark_mode) | 1360 w->region_showing = (!NILP (Vtransient_mark_mode) |
1359 && w == XWINDOW (current_buffer->last_selected_window) | 1361 && (w == XWINDOW (current_buffer->last_selected_window) |
1362 || highlight_nonselected_windows) | |
1360 && !NILP (XBUFFER (w->buffer)->mark_active) | 1363 && !NILP (XBUFFER (w->buffer)->mark_active) |
1361 ? Fmarker_position (XBUFFER (w->buffer)->mark) | 1364 ? Fmarker_position (XBUFFER (w->buffer)->mark) |
1362 : Qnil); | 1365 : Qnil); |
1363 } | 1366 } |
1364 | 1367 |
2780 || !NILP (current_buffer->truncate_lines)); | 2783 || !NILP (current_buffer->truncate_lines)); |
2781 | 2784 |
2782 /* 1 if we should highlight the region. */ | 2785 /* 1 if we should highlight the region. */ |
2783 int highlight_region | 2786 int highlight_region |
2784 = (!NILP (Vtransient_mark_mode) && !NILP (current_buffer->mark_active) | 2787 = (!NILP (Vtransient_mark_mode) && !NILP (current_buffer->mark_active) |
2785 && XWINDOW (current_buffer->last_selected_window) == w); | 2788 && (XWINDOW (current_buffer->last_selected_window) == w |
2789 || highlight_nonselected_windows)); | |
2786 int region_beg, region_end; | 2790 int region_beg, region_end; |
2787 | 2791 |
2788 int selective = (INTEGERP (current_buffer->selective_display) | 2792 int selective = (INTEGERP (current_buffer->selective_display) |
2789 ? XINT (current_buffer->selective_display) | 2793 ? XINT (current_buffer->selective_display) |
2790 : !NILP (current_buffer->selective_display) ? -1 : 0); | 2794 : !NILP (current_buffer->selective_display) ? -1 : 0); |
4901 "*Maximum buffer size for which line number should be displayed."); | 4905 "*Maximum buffer size for which line number should be displayed."); |
4902 line_number_display_limit = 1000000; | 4906 line_number_display_limit = 1000000; |
4903 | 4907 |
4904 DEFVAR_BOOL ("highlight-nonselected-windows", &highlight_nonselected_windows, | 4908 DEFVAR_BOOL ("highlight-nonselected-windows", &highlight_nonselected_windows, |
4905 "*Non-nil means highlight region even in nonselected windows."); | 4909 "*Non-nil means highlight region even in nonselected windows."); |
4906 highlight_nonselected_windows = 1; | 4910 highlight_nonselected_windows = 0; |
4907 | 4911 |
4908 DEFVAR_BOOL ("multiple-frames", &multiple_frames, | 4912 DEFVAR_BOOL ("multiple-frames", &multiple_frames, |
4909 "Non-nil if more than one frame is visible on this display.\n\ | 4913 "Non-nil if more than one frame is visible on this display.\n\ |
4910 Minibuffer-only frames don't count, but iconified frames do.\n\ | 4914 Minibuffer-only frames don't count, but iconified frames do.\n\ |
4911 This variable is not guaranteed to be accurate except while processing\n\ | 4915 This variable is not guaranteed to be accurate except while processing\n\ |