From d3e2acb659b1ff5a7e71bceb960af75f33a9ee39 Mon Sep 17 00:00:00 2001 From: Andreas Politz Date: Sun, 29 Sep 2013 10:33:23 +0200 Subject: [PATCH] In delete_frame record selected frame only after calling Qdelete_frame_functions (Bug#15477). * frame.c (delete_frame): Record selected frame only after calling Qdelete_frame_functions (Bug#15477). --- src/ChangeLog | 5 +++++ src/frame.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 4c298873dcc..0316ca1d2f2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2013-09-29 Andreas Politz (tiny change) + + * frame.c (delete_frame): Record selected frame only after + calling Qdelete_frame_functions (Bug#15477). + 2013-09-28 Jan Djärv * nsterm.m (ns_selection_color): Remove. diff --git a/src/frame.c b/src/frame.c index 2e90713b6c3..f7ba23401ce 100644 --- a/src/frame.c +++ b/src/frame.c @@ -1190,7 +1190,7 @@ Lisp_Object delete_frame (Lisp_Object frame, Lisp_Object force) { struct frame *f = decode_any_frame (frame); - struct frame *sf = SELECTED_FRAME (); + struct frame *sf; struct kboard *kb; int minibuffer_selected, is_tooltip_frame; @@ -1265,7 +1265,7 @@ delete_frame (Lisp_Object frame, Lisp_Object force) There is no more chance for errors to prevent it. */ minibuffer_selected = EQ (minibuf_window, selected_window); - + sf = SELECTED_FRAME (); /* Don't let the frame remain selected. */ if (f == sf) { -- 2.39.2