=== modified file 'src/window.h' --- src/window.h 2012-06-29 11:48:08 +0000 +++ src/window.h 2012-07-01 09:55:44 +0000 @@ -198,10 +198,6 @@ as long as the window shows that buffer. */ Lisp_Object base_line_pos; - /* If we have highlighted the region (or any part of it), - this is the mark position that we used, as an integer. */ - Lisp_Object region_showing; - /* The column number currently displayed in this window's mode line, or nil if column numbers are not being displayed. */ Lisp_Object column_number_displayed; @@ -289,6 +285,9 @@ was last updated. */ unsigned last_had_star : 1; + /* Non-zero if we have highlighted the region (or any part of it). */ + unsigned region_showing : 1; + /* Non-zero means current value of `start' was the beginning of a line when it was chosen. */ unsigned start_at_line_beg : 1; === modified file 'src/xdisp.c' --- src/xdisp.c 2012-06-29 18:52:54 +0000 +++ src/xdisp.c 2012-07-01 14:56:24 +0000 @@ -11202,7 +11202,7 @@ != w->last_had_star) || ((!NILP (Vtransient_mark_mode) && !NILP (BVAR (XBUFFER (w->buffer), mark_active))) - != !NILP (w->region_showing))) + != w->region_showing)) { struct buffer *prev = current_buffer; ptrdiff_t count = SPECPDL_INDEX (); @@ -11400,7 +11400,7 @@ != w->last_had_star) || ((!NILP (Vtransient_mark_mode) && !NILP (BVAR (XBUFFER (w->buffer), mark_active))) - != !NILP (w->region_showing))) + != w->region_showing)) { struct buffer *prev = current_buffer; ptrdiff_t count = SPECPDL_INDEX (); @@ -13105,10 +13105,7 @@ the optimization directly below this if-statement. */ if (((!NILP (Vtransient_mark_mode) && !NILP (BVAR (XBUFFER (w->buffer), mark_active))) - != !NILP (w->region_showing)) - || (!NILP (w->region_showing) - && !EQ (w->region_showing, - Fmarker_position (BVAR (XBUFFER (w->buffer), mark))))) + != w->region_showing) || w->region_showing) CHARPOS (this_line_start_pos) = 0; /* Optimize the case that only the line containing the cursor in the @@ -13276,7 +13273,7 @@ && (EQ (selected_window, BVAR (current_buffer, last_selected_window)) || highlight_nonselected_windows) - && NILP (w->region_showing) + && !w->region_showing && NILP (Vshow_trailing_whitespace) && !cursor_in_echo_area) { @@ -14953,7 +14950,7 @@ set the cursor. */ && !(!NILP (Vtransient_mark_mode) && !NILP (BVAR (current_buffer, mark_active))) - && NILP (w->region_showing) + && !w->region_showing && NILP (Vshow_trailing_whitespace) /* This code is not used for mini-buffer for the sake of the case of redisplaying to replace an echo area message; since in @@ -16324,7 +16321,7 @@ /* Can't do this if region may have changed. */ if ((!NILP (Vtransient_mark_mode) && !NILP (BVAR (current_buffer, mark_active))) - || !NILP (w->region_showing) + || w->region_showing || !NILP (Vshow_trailing_whitespace)) return 0; @@ -17156,7 +17153,7 @@ GIVE_UP (11); /* Likewise if showing a region. */ - if (!NILP (w->region_showing)) + if (w->region_showing) GIVE_UP (10); /* Can't use this if overlay arrow position and/or string have @@ -19134,7 +19131,7 @@ } /* Is IT->w showing the region? */ - it->w->region_showing = it->region_beg_charpos > 0 ? Qt : Qnil; + it->w->region_showing = it->region_beg_charpos > 0; /* Clear the result glyph row and enable it. */ prepare_desired_row (row);