Commit d2a95ffb authored by Dmitry Antipov's avatar Dmitry Antipov
Browse files

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.
parent 998ad848
2013-08-07 Dmitry Antipov <dmantipov@yandex.ru>
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 <dmantipov@yandex.ru>
Be more careful if selected window shows the buffer other than current,
......
......@@ -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);
......
......@@ -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;
}
......
......@@ -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 ();
......
......@@ -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));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment