diff options
| author | Joakim Verona | 2013-02-05 00:03:35 +0100 |
|---|---|---|
| committer | Joakim Verona | 2013-02-05 00:03:35 +0100 |
| commit | 4fd0ce60584239e481858fe11c5ded6a7427f898 (patch) | |
| tree | b52954e3e411f4ec0ff9fe27c4e4576257097fdb /src | |
| parent | c877afeb2bdca205b7d4e19fb37eb0c9cf209540 (diff) | |
| parent | 50fdf3998794e013c5cb752962e75b883422b75b (diff) | |
| download | emacs-4fd0ce60584239e481858fe11c5ded6a7427f898.tar.gz emacs-4fd0ce60584239e481858fe11c5ded6a7427f898.zip | |
auto upstream
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 17 | ||||
| -rw-r--r-- | src/fileio.c | 2 | ||||
| -rw-r--r-- | src/window.h | 8 | ||||
| -rw-r--r-- | src/xdisp.c | 17 |
4 files changed, 38 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 1c7771cb0d9..cbfeadc04a3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,20 @@ | |||
| 1 | 2013-02-04 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * fileio.c (Qchoose_write_coding_system): Now static. | ||
| 4 | |||
| 5 | 2013-02-04 Eli Zaretskii <eliz@gnu.org> | ||
| 6 | |||
| 7 | * xdisp.c (window_buffer_changed): region_showing can be negative, | ||
| 8 | which still means region is being displayed. | ||
| 9 | (redisplay_internal): Resurrect code that forced redisplay of the | ||
| 10 | whole window when showing region and the mark has changed. Record | ||
| 11 | the new mark position to allow redisplay optimizations. | ||
| 12 | (display_line): If it->region_beg_charpos is non-zero, set the | ||
| 13 | window's region_showing member to -1. (Bug#13623) (Bug#13626) | ||
| 14 | |||
| 15 | * window.h (struct window) <region_showing>: Declare ptrdiff_t, | ||
| 16 | not bitfield of 1 bit. | ||
| 17 | |||
| 1 | 2013-02-03 Daniel Colascione <dancol@dancol.org> | 18 | 2013-02-03 Daniel Colascione <dancol@dancol.org> |
| 2 | 19 | ||
| 3 | * emacs.c: Use execvp, not execv, when DAEMON_MUST_EXEC, so that | 20 | * emacs.c: Use execvp, not execv, when DAEMON_MUST_EXEC, so that |
diff --git a/src/fileio.c b/src/fileio.c index e76f2bc2420..1b293e3a971 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -251,7 +251,7 @@ static Lisp_Object Qfile_acl; | |||
| 251 | static Lisp_Object Qset_file_acl; | 251 | static Lisp_Object Qset_file_acl; |
| 252 | static Lisp_Object Qfile_newer_than_file_p; | 252 | static Lisp_Object Qfile_newer_than_file_p; |
| 253 | Lisp_Object Qinsert_file_contents; | 253 | Lisp_Object Qinsert_file_contents; |
| 254 | Lisp_Object Qchoose_write_coding_system; | 254 | static Lisp_Object Qchoose_write_coding_system; |
| 255 | Lisp_Object Qwrite_region; | 255 | Lisp_Object Qwrite_region; |
| 256 | static Lisp_Object Qverify_visited_file_modtime; | 256 | static Lisp_Object Qverify_visited_file_modtime; |
| 257 | static Lisp_Object Qset_visited_file_modtime; | 257 | static Lisp_Object Qset_visited_file_modtime; |
diff --git a/src/window.h b/src/window.h index f28ce1424d0..0f4f242641e 100644 --- a/src/window.h +++ b/src/window.h | |||
| @@ -333,13 +333,15 @@ struct window | |||
| 333 | the frame image that window_end_pos did not get onto the frame. */ | 333 | the frame image that window_end_pos did not get onto the frame. */ |
| 334 | unsigned window_end_valid : 1; | 334 | unsigned window_end_valid : 1; |
| 335 | 335 | ||
| 336 | /* Nonzero if we have highlighted the region (or any part of it). */ | ||
| 337 | unsigned region_showing : 1; | ||
| 338 | |||
| 339 | /* Amount by which lines of this window are scrolled in | 336 | /* Amount by which lines of this window are scrolled in |
| 340 | y-direction (smooth scrolling). */ | 337 | y-direction (smooth scrolling). */ |
| 341 | int vscroll; | 338 | int vscroll; |
| 342 | 339 | ||
| 340 | /* If we have highlighted the region (or any part of it), the mark | ||
| 341 | position or -1 (the latter is used by the iterator for internal | ||
| 342 | purposes); otherwise zero. */ | ||
| 343 | ptrdiff_t region_showing; | ||
| 344 | |||
| 343 | /* Z_BYTE - buffer position of the last glyph in the current matrix of W. | 345 | /* Z_BYTE - buffer position of the last glyph in the current matrix of W. |
| 344 | Should be nonnegative, and only valid if window_end_valid is nonzero. */ | 346 | Should be nonnegative, and only valid if window_end_valid is nonzero. */ |
| 345 | ptrdiff_t window_end_bytepos; | 347 | ptrdiff_t window_end_bytepos; |
diff --git a/src/xdisp.c b/src/xdisp.c index 33fe82e165e..fe6aa8ad8c3 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -10807,7 +10807,7 @@ window_buffer_changed (struct window *w) | |||
| 10807 | 10807 | ||
| 10808 | return (((BUF_SAVE_MODIFF (b) < BUF_MODIFF (b)) != w->last_had_star) | 10808 | return (((BUF_SAVE_MODIFF (b) < BUF_MODIFF (b)) != w->last_had_star) |
| 10809 | || ((!NILP (Vtransient_mark_mode) && !NILP (BVAR (b, mark_active))) | 10809 | || ((!NILP (Vtransient_mark_mode) && !NILP (BVAR (b, mark_active))) |
| 10810 | != w->region_showing)); | 10810 | != (w->region_showing != 0))); |
| 10811 | } | 10811 | } |
| 10812 | 10812 | ||
| 10813 | /* Nonzero if W has %c in its mode line and mode line should be updated. */ | 10813 | /* Nonzero if W has %c in its mode line and mode line should be updated. */ |
| @@ -13070,6 +13070,17 @@ redisplay_internal (void) | |||
| 13070 | clear_garbaged_frames (); | 13070 | clear_garbaged_frames (); |
| 13071 | } | 13071 | } |
| 13072 | 13072 | ||
| 13073 | /* If showing the region, and mark has changed, we must redisplay | ||
| 13074 | the whole window. The assignment to this_line_start_pos prevents | ||
| 13075 | the optimization directly below this if-statement. */ | ||
| 13076 | if (((!NILP (Vtransient_mark_mode) | ||
| 13077 | && !NILP (BVAR (XBUFFER (w->buffer), mark_active))) | ||
| 13078 | != (w->region_showing > 0)) | ||
| 13079 | || (w->region_showing | ||
| 13080 | && w->region_showing | ||
| 13081 | != XINT (Fmarker_position (BVAR (XBUFFER (w->buffer), mark))))) | ||
| 13082 | CHARPOS (this_line_start_pos) = 0; | ||
| 13083 | |||
| 13073 | /* Optimize the case that only the line containing the cursor in the | 13084 | /* Optimize the case that only the line containing the cursor in the |
| 13074 | selected window has changed. Variables starting with this_ are | 13085 | selected window has changed. Variables starting with this_ are |
| 13075 | set in display_line and record information about the line | 13086 | set in display_line and record information about the line |
| @@ -13289,6 +13300,8 @@ redisplay_internal (void) | |||
| 13289 | ++clear_image_cache_count; | 13300 | ++clear_image_cache_count; |
| 13290 | #endif | 13301 | #endif |
| 13291 | 13302 | ||
| 13303 | w->region_showing = XINT (Fmarker_position (BVAR (XBUFFER (w->buffer), mark))); | ||
| 13304 | |||
| 13292 | /* Build desired matrices, and update the display. If | 13305 | /* Build desired matrices, and update the display. If |
| 13293 | consider_all_windows_p is non-zero, do it for all windows on all | 13306 | consider_all_windows_p is non-zero, do it for all windows on all |
| 13294 | frames. Otherwise do it for selected_window, only. */ | 13307 | frames. Otherwise do it for selected_window, only. */ |
| @@ -19225,7 +19238,7 @@ display_line (struct it *it) | |||
| 19225 | } | 19238 | } |
| 19226 | 19239 | ||
| 19227 | /* Is IT->w showing the region? */ | 19240 | /* Is IT->w showing the region? */ |
| 19228 | it->w->region_showing = it->region_beg_charpos > 0; | 19241 | it->w->region_showing = it->region_beg_charpos > 0 ? -1 : 0; |
| 19229 | 19242 | ||
| 19230 | /* Clear the result glyph row and enable it. */ | 19243 | /* Clear the result glyph row and enable it. */ |
| 19231 | prepare_desired_row (row); | 19244 | prepare_desired_row (row); |