aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoakim Verona2013-04-13 08:30:33 +0200
committerJoakim Verona2013-04-13 08:30:33 +0200
commit44399ce2917f50909cfcd7a82aa071e58cc81dae (patch)
tree3d1cb6ff4b7934f9171f4f6a8c09f31b02be22e3 /src
parentea0a8e9d270b2b0cfbc2b137b1e6c3922bc2ab5b (diff)
parent011cddd649d81956ce13b9325b059dac78e61c4d (diff)
downloademacs-44399ce2917f50909cfcd7a82aa071e58cc81dae.tar.gz
emacs-44399ce2917f50909cfcd7a82aa071e58cc81dae.zip
auto upstream
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog29
-rw-r--r--src/window.c10
2 files changed, 24 insertions, 15 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 7f4c59b8eb4..08f33eb7d02 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12013-04-12 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * window.c (select_window): `record_buffer' even if window is
4 already selected (bug#14191).
5
12013-04-11 Eli Zaretskii <eliz@gnu.org> 62013-04-11 Eli Zaretskii <eliz@gnu.org>
2 7
3 * window.c (Fwindow_end): Test more flags, including the buffer's 8 * window.c (Fwindow_end): Test more flags, including the buffer's
@@ -10,8 +15,8 @@
102013-04-10 Eli Zaretskii <eliz@gnu.org> 152013-04-10 Eli Zaretskii <eliz@gnu.org>
11 16
12 * frame.c (do_switch_frame): Mark the TTY frame we switch to as 17 * frame.c (do_switch_frame): Mark the TTY frame we switch to as
13 garbaged only if it is not already the top frame on its TTY. This 18 garbaged only if it is not already the top frame on its TTY.
14 prevents flickering due to constant redrawing of TTY frames when 19 This prevents flickering due to constant redrawing of TTY frames when
15 there are GUI frames open in the same session. (Bug#13864) 20 there are GUI frames open in the same session. (Bug#13864)
16 21
172013-04-10 Stefan Monnier <monnier@iro.umontreal.ca> 222013-04-10 Stefan Monnier <monnier@iro.umontreal.ca>
@@ -95,7 +100,7 @@
95 The following changes is to optimize the code for reading UTF-8 100 The following changes is to optimize the code for reading UTF-8
96 files. 101 files.
97 102
98 * coding.c (check_ascii): Renamed from detect_ascii. Return value 103 * coding.c (check_ascii): Rename from detect_ascii. Return value
99 changed. Check EOL format. Do not call adjust_coding_eol_type 104 changed. Check EOL format. Do not call adjust_coding_eol_type
100 here. 105 here.
101 (check_utf_8): New function. 106 (check_utf_8): New function.
@@ -287,8 +292,8 @@
287 292
288 * xdisp.c (with_echo_area_buffer_unwind_data): Save window 293 * xdisp.c (with_echo_area_buffer_unwind_data): Save window
289 start marker... 294 start marker...
290 (unwind_with_echo_area_buffer): ...to restore it here. This 295 (unwind_with_echo_area_buffer): ...to restore it here.
291 is needed to ensure that... 296 This is needed to ensure that...
292 (redisplay_window): ...both window markers are valid here, 297 (redisplay_window): ...both window markers are valid here,
293 which is verified by eassert. 298 which is verified by eassert.
294 * editfns.c (save_excursion_save): Do not assume that 299 * editfns.c (save_excursion_save): Do not assume that
@@ -438,10 +443,10 @@
438 443
439 * w32term.c (w32fullscreen_hook): Use FRAME_NORMAL_WIDTH, 444 * w32term.c (w32fullscreen_hook): Use FRAME_NORMAL_WIDTH,
440 FRAME_NORMAL_HEIGHT, and FRAME_PREV_FSMODE, instead of static 445 FRAME_NORMAL_HEIGHT, and FRAME_PREV_FSMODE, instead of static
441 variables, to save and restore frame dimensions. Use 446 variables, to save and restore frame dimensions.
442 FRAME_NORMAL_LEFT and FRAME_NORMAL_TOP to restore frame position 447 Use FRAME_NORMAL_LEFT and FRAME_NORMAL_TOP to restore frame position
443 after returning from a 'fullscreen' configuration. use 448 after returning from a 'fullscreen' configuration.
444 SendMessage instead of PostMessage to send the SC_RESTORE message, 449 use SendMessage instead of PostMessage to send the SC_RESTORE message,
445 to avoid races between the main thread and the input thread. 450 to avoid races between the main thread and the input thread.
446 451
447 * w32term.h (struct w32_output): New members normal_width, 452 * w32term.h (struct w32_output): New members normal_width,
@@ -526,10 +531,10 @@
526 531
527 * frame.h (struct frame): Drop resx and resy because the same data is 532 * frame.h (struct frame): Drop resx and resy because the same data is
528 available from window system-specific output context. Adjust users. 533 available from window system-specific output context. Adjust users.
529 (default_pixels_per_inch_x, default_pixels_per_inch_y): New 534 (default_pixels_per_inch_x, default_pixels_per_inch_y):
530 functions to provide defaults when no window system available. 535 New functions to provide defaults when no window system available.
531 (FRAME_RES_X, FRAME_RES_Y): New macros. 536 (FRAME_RES_X, FRAME_RES_Y): New macros.
532 (NUMVAL): Moved from xdisp.c. 537 (NUMVAL): Move from xdisp.c.
533 * font.c (font_pixel_size, font_find_for_lface, font_open_for_lface) 538 * font.c (font_pixel_size, font_find_for_lface, font_open_for_lface)
534 (Ffont_face_attributes, Fopen_font): 539 (Ffont_face_attributes, Fopen_font):
535 * image.c (gs_load): 540 * image.c (gs_load):
diff --git a/src/window.c b/src/window.c
index ee3feb90b7b..ed2505a893f 100644
--- a/src/window.c
+++ b/src/window.c
@@ -490,7 +490,10 @@ select_window (Lisp_Object window, Lisp_Object norecord, int inhibit_point_swap)
490 Fset_buffer (w->contents); 490 Fset_buffer (w->contents);
491 491
492 if (EQ (window, selected_window) && !inhibit_point_swap) 492 if (EQ (window, selected_window) && !inhibit_point_swap)
493 return window; 493 /* `switch-to-buffer' uses (select-window (selected-window)) as a "clever"
494 way to call record_buffer from Elisp, so it's important that we call
495 record_buffer before returning here. */
496 goto record_and_return;
494 497
495 sf = SELECTED_FRAME (); 498 sf = SELECTED_FRAME ();
496 if (XFRAME (WINDOW_FRAME (w)) != sf) 499 if (XFRAME (WINDOW_FRAME (w)) != sf)
@@ -509,7 +512,10 @@ select_window (Lisp_Object window, Lisp_Object norecord, int inhibit_point_swap)
509 fset_selected_window (sf, window); 512 fset_selected_window (sf, window);
510 513
511 select_window_1 (window, inhibit_point_swap); 514 select_window_1 (window, inhibit_point_swap);
515 bset_last_selected_window (XBUFFER (w->contents), window);
516 windows_or_buffers_changed++;
512 517
518 record_and_return:
513 /* record_buffer can run QUIT, so make sure it is run only after we have 519 /* record_buffer can run QUIT, so make sure it is run only after we have
514 re-established the invariant between selected_window and selected_frame, 520 re-established the invariant between selected_window and selected_frame,
515 otherwise the temporary broken invariant might "escape" (bug#14161). */ 521 otherwise the temporary broken invariant might "escape" (bug#14161). */
@@ -519,8 +525,6 @@ select_window (Lisp_Object window, Lisp_Object norecord, int inhibit_point_swap)
519 record_buffer (w->contents); 525 record_buffer (w->contents);
520 } 526 }
521 527
522 bset_last_selected_window (XBUFFER (w->contents), window);
523 windows_or_buffers_changed++;
524 return window; 528 return window;
525} 529}
526 530