[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r112272: * src/window.c (select_windo
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r112272: * src/window.c (select_window): `record_buffer' even if window is |
Date: |
Fri, 12 Apr 2013 13:32:52 -0400 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 112272
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14191
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Fri 2013-04-12 13:32:52 -0400
message:
* src/window.c (select_window): `record_buffer' even if window is
already selected.
modified:
src/ChangeLog
src/window.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-04-11 16:06:47 +0000
+++ b/src/ChangeLog 2013-04-12 17:32:52 +0000
@@ -1,3 +1,8 @@
+2013-04-12 Stefan Monnier <address@hidden>
+
+ * window.c (select_window): `record_buffer' even if window is
+ already selected (bug#14191).
+
2013-04-11 Eli Zaretskii <address@hidden>
* window.c (Fwindow_end): Test more flags, including the buffer's
@@ -10,8 +15,8 @@
2013-04-10 Eli Zaretskii <address@hidden>
* frame.c (do_switch_frame): Mark the TTY frame we switch to as
- garbaged only if it is not already the top frame on its TTY. This
- prevents flickering due to constant redrawing of TTY frames when
+ garbaged only if it is not already the top frame on its TTY.
+ This prevents flickering due to constant redrawing of TTY frames when
there are GUI frames open in the same session. (Bug#13864)
2013-04-10 Stefan Monnier <address@hidden>
@@ -95,7 +100,7 @@
The following changes is to optimize the code for reading UTF-8
files.
- * coding.c (check_ascii): Renamed from detect_ascii. Return value
+ * coding.c (check_ascii): Rename from detect_ascii. Return value
changed. Check EOL format. Do not call adjust_coding_eol_type
here.
(check_utf_8): New function.
@@ -287,8 +292,8 @@
* xdisp.c (with_echo_area_buffer_unwind_data): Save window
start marker...
- (unwind_with_echo_area_buffer): ...to restore it here. This
- is needed to ensure that...
+ (unwind_with_echo_area_buffer): ...to restore it here.
+ This is needed to ensure that...
(redisplay_window): ...both window markers are valid here,
which is verified by eassert.
* editfns.c (save_excursion_save): Do not assume that
@@ -438,10 +443,10 @@
* w32term.c (w32fullscreen_hook): Use FRAME_NORMAL_WIDTH,
FRAME_NORMAL_HEIGHT, and FRAME_PREV_FSMODE, instead of static
- variables, to save and restore frame dimensions. Use
- FRAME_NORMAL_LEFT and FRAME_NORMAL_TOP to restore frame position
- after returning from a 'fullscreen' configuration. use
- SendMessage instead of PostMessage to send the SC_RESTORE message,
+ variables, to save and restore frame dimensions.
+ Use FRAME_NORMAL_LEFT and FRAME_NORMAL_TOP to restore frame position
+ after returning from a 'fullscreen' configuration.
+ use SendMessage instead of PostMessage to send the SC_RESTORE message,
to avoid races between the main thread and the input thread.
* w32term.h (struct w32_output): New members normal_width,
@@ -526,10 +531,10 @@
* frame.h (struct frame): Drop resx and resy because the same data is
available from window system-specific output context. Adjust users.
- (default_pixels_per_inch_x, default_pixels_per_inch_y): New
- functions to provide defaults when no window system available.
+ (default_pixels_per_inch_x, default_pixels_per_inch_y):
+ New functions to provide defaults when no window system available.
(FRAME_RES_X, FRAME_RES_Y): New macros.
- (NUMVAL): Moved from xdisp.c.
+ (NUMVAL): Move from xdisp.c.
* font.c (font_pixel_size, font_find_for_lface, font_open_for_lface)
(Ffont_face_attributes, Fopen_font):
* image.c (gs_load):
=== modified file 'src/window.c'
--- a/src/window.c 2013-04-11 16:06:47 +0000
+++ b/src/window.c 2013-04-12 17:32:52 +0000
@@ -489,7 +489,10 @@
Fset_buffer (w->contents);
if (EQ (window, selected_window) && !inhibit_point_swap)
- return window;
+ /* `switch-to-buffer' uses (select-window (selected-window)) as a "clever"
+ way to call record_buffer from Elisp, so it's important that we call
+ record_buffer before returning here. */
+ goto record_and_return;
sf = SELECTED_FRAME ();
if (XFRAME (WINDOW_FRAME (w)) != sf)
@@ -508,7 +511,10 @@
fset_selected_window (sf, window);
select_window_1 (window, inhibit_point_swap);
+ bset_last_selected_window (XBUFFER (w->contents), window);
+ windows_or_buffers_changed++;
+ record_and_return:
/* record_buffer can run QUIT, so make sure it is run only after we have
re-established the invariant between selected_window and selected_frame,
otherwise the temporary broken invariant might "escape" (bug#14161). */
@@ -518,8 +524,6 @@
record_buffer (w->contents);
}
- bset_last_selected_window (XBUFFER (w->contents), window);
- windows_or_buffers_changed++;
return window;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r112272: * src/window.c (select_window): `record_buffer' even if window is,
Stefan Monnier <=