From: Richard M. Stallman Date: Sat, 30 Aug 1997 17:51:22 +0000 (+0000) Subject: (change_frame_size_1): Save current buffer X-Git-Tag: emacs-20.1~321 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e523f7e5266d89a4dc625d69d09a90bdf044f673;p=emacs.git (change_frame_size_1): Save current buffer around calling Fset_window_buffer. --- diff --git a/src/dispnew.c b/src/dispnew.c index 36643594cb0..a7441b990d6 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -2126,6 +2126,7 @@ change_frame_size_1 (frame, newheight, newwidth, pretend, delay) { int new_frame_window_width; unsigned int total_glyphs; + int count = specpdl_ptr - specpdl; /* If we can't deal with the change now, queue it for later. */ if (delay) @@ -2232,9 +2233,13 @@ change_frame_size_1 (frame, newheight, newwidth, pretend, delay) UNBLOCK_INPUT; + record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); + /* This isn't quite a no-op: it runs window-configuration-change-hook. */ Fset_window_buffer (FRAME_SELECTED_WINDOW (frame), XWINDOW (FRAME_SELECTED_WINDOW (frame))->buffer); + + unbind_to (count, Qnil); } DEFUN ("send-string-to-terminal", Fsend_string_to_terminal,