From: Dmitry Antipov Date: Wed, 7 Aug 2013 13:21:59 +0000 (+0400) Subject: Prefer selected_window to Fselected_window, likewise for frames. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1686^2~390 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d2a95ffb4eeed87b00c9ac1c8eec7d39b06226e5;p=emacs.git Prefer selected_window to Fselected_window, likewise for frames. * buffer.c (Fbuffer_swap_text): * data.c (Fvariable_binding_locus): * window.c (run_window_configuration_change_hook): Adjust users. * w16select.c (Fw16_set_clipboard_data, Fw16_get_clipboard_data): Use decode_live_frame. --- diff --git a/src/ChangeLog b/src/ChangeLog index a090e02e74a..4f7646ea835 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2013-08-07 Dmitry Antipov + + Prefer selected_window to Fselected_window, likewise for frames. + * buffer.c (Fbuffer_swap_text): + * data.c (Fvariable_binding_locus): + * window.c (run_window_configuration_change_hook): Adjust users. + * w16select.c (Fw16_set_clipboard_data, Fw16_get_clipboard_data): + Use decode_live_frame. + 2013-08-07 Dmitry Antipov Be more careful if selected window shows the buffer other than current, diff --git a/src/buffer.c b/src/buffer.c index 339175d9078..ce4b44c87c3 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -2409,7 +2409,7 @@ DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text, live window points to that window's buffer. So since we just swapped the markers between the two buffers, we need to undo the effect of this swap for window markers. */ - Lisp_Object w = Fselected_window (), ws = Qnil; + Lisp_Object w = selected_window, ws = Qnil; Lisp_Object buf1, buf2; XSETBUFFER (buf1, current_buffer); XSETBUFFER (buf2, other_buffer); diff --git a/src/data.c b/src/data.c index ef3a6965779..9f4bd1f1c02 100644 --- a/src/data.c +++ b/src/data.c @@ -1975,7 +1975,7 @@ If the current binding is global (the default), the value is nil. */) { union Lisp_Fwd *valcontents = SYMBOL_FWD (sym); if (KBOARD_OBJFWDP (valcontents)) - return Fframe_terminal (Fselected_frame ()); + return Fframe_terminal (selected_frame); else if (!BUFFER_OBJFWDP (valcontents)) return Qnil; } diff --git a/src/w16select.c b/src/w16select.c index 3bcc663e565..864757b3e61 100644 --- a/src/w16select.c +++ b/src/w16select.c @@ -452,11 +452,7 @@ DEFUN ("w16-set-clipboard-data", Fw16_set_clipboard_data, Sw16_set_clipboard_dat CHECK_STRING (string); - if (NILP (frame)) - frame = Fselected_frame (); - - CHECK_LIVE_FRAME (frame); - if ( !FRAME_MSDOS_P (XFRAME (frame))) + if (!FRAME_MSDOS_P (decode_live_frame (frame))) goto done; block_input (); @@ -558,11 +554,7 @@ DEFUN ("w16-get-clipboard-data", Fw16_get_clipboard_data, Sw16_get_clipboard_dat Lisp_Object ret = Qnil; int require_decoding = 0; - if (NILP (frame)) - frame = Fselected_frame (); - - CHECK_LIVE_FRAME (frame); - if ( !FRAME_MSDOS_P (XFRAME (frame))) + if (!FRAME_MSDOS_P (decode_live_frame (frame))) goto done; block_input (); diff --git a/src/window.c b/src/window.c index dff449072f5..118c5852275 100644 --- a/src/window.c +++ b/src/window.c @@ -3128,7 +3128,7 @@ run_window_configuration_change_hook (struct frame *f) if (SELECTED_FRAME () != f) { - record_unwind_protect (select_frame_norecord, Fselected_frame ()); + record_unwind_protect (select_frame_norecord, selected_frame); select_frame_norecord (frame); } @@ -3143,7 +3143,7 @@ run_window_configuration_change_hook (struct frame *f) buffer))) { ptrdiff_t inner_count = SPECPDL_INDEX (); - record_unwind_protect (select_window_norecord, Fselected_window ()); + record_unwind_protect (select_window_norecord, selected_window); select_window_norecord (window); run_funs (Fbuffer_local_value (Qwindow_configuration_change_hook, buffer));