aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDmitry Antipov2013-08-07 17:21:59 +0400
committerDmitry Antipov2013-08-07 17:21:59 +0400
commitd2a95ffb4eeed87b00c9ac1c8eec7d39b06226e5 (patch)
tree5aed90856ab78eaa3ff59d5d42a043ab798fa5ac /src
parent998ad848a4f1fd347fdbb1cf181035a0e174eddc (diff)
downloademacs-d2a95ffb4eeed87b00c9ac1c8eec7d39b06226e5.tar.gz
emacs-d2a95ffb4eeed87b00c9ac1c8eec7d39b06226e5.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog9
-rw-r--r--src/buffer.c2
-rw-r--r--src/data.c2
-rw-r--r--src/w16select.c12
-rw-r--r--src/window.c4
5 files changed, 15 insertions, 14 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index a090e02e74a..4f7646ea835 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,14 @@
12013-08-07 Dmitry Antipov <dmantipov@yandex.ru> 12013-08-07 Dmitry Antipov <dmantipov@yandex.ru>
2 2
3 Prefer selected_window to Fselected_window, likewise for frames.
4 * buffer.c (Fbuffer_swap_text):
5 * data.c (Fvariable_binding_locus):
6 * window.c (run_window_configuration_change_hook): Adjust users.
7 * w16select.c (Fw16_set_clipboard_data, Fw16_get_clipboard_data):
8 Use decode_live_frame.
9
102013-08-07 Dmitry Antipov <dmantipov@yandex.ru>
11
3 Be more careful if selected window shows the buffer other than current, 12 Be more careful if selected window shows the buffer other than current,
4 use window_outdated only if this is not so. This change should also 13 use window_outdated only if this is not so. This change should also
5 address some weird issues discussed in Bug#13012. 14 address some weird issues discussed in Bug#13012.
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,
2409 live window points to that window's buffer. So since we 2409 live window points to that window's buffer. So since we
2410 just swapped the markers between the two buffers, we need 2410 just swapped the markers between the two buffers, we need
2411 to undo the effect of this swap for window markers. */ 2411 to undo the effect of this swap for window markers. */
2412 Lisp_Object w = Fselected_window (), ws = Qnil; 2412 Lisp_Object w = selected_window, ws = Qnil;
2413 Lisp_Object buf1, buf2; 2413 Lisp_Object buf1, buf2;
2414 XSETBUFFER (buf1, current_buffer); XSETBUFFER (buf2, other_buffer); 2414 XSETBUFFER (buf1, current_buffer); XSETBUFFER (buf2, other_buffer);
2415 2415
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. */)
1975 { 1975 {
1976 union Lisp_Fwd *valcontents = SYMBOL_FWD (sym); 1976 union Lisp_Fwd *valcontents = SYMBOL_FWD (sym);
1977 if (KBOARD_OBJFWDP (valcontents)) 1977 if (KBOARD_OBJFWDP (valcontents))
1978 return Fframe_terminal (Fselected_frame ()); 1978 return Fframe_terminal (selected_frame);
1979 else if (!BUFFER_OBJFWDP (valcontents)) 1979 else if (!BUFFER_OBJFWDP (valcontents))
1980 return Qnil; 1980 return Qnil;
1981 } 1981 }
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
452 452
453 CHECK_STRING (string); 453 CHECK_STRING (string);
454 454
455 if (NILP (frame)) 455 if (!FRAME_MSDOS_P (decode_live_frame (frame)))
456 frame = Fselected_frame ();
457
458 CHECK_LIVE_FRAME (frame);
459 if ( !FRAME_MSDOS_P (XFRAME (frame)))
460 goto done; 456 goto done;
461 457
462 block_input (); 458 block_input ();
@@ -558,11 +554,7 @@ DEFUN ("w16-get-clipboard-data", Fw16_get_clipboard_data, Sw16_get_clipboard_dat
558 Lisp_Object ret = Qnil; 554 Lisp_Object ret = Qnil;
559 int require_decoding = 0; 555 int require_decoding = 0;
560 556
561 if (NILP (frame)) 557 if (!FRAME_MSDOS_P (decode_live_frame (frame)))
562 frame = Fselected_frame ();
563
564 CHECK_LIVE_FRAME (frame);
565 if ( !FRAME_MSDOS_P (XFRAME (frame)))
566 goto done; 558 goto done;
567 559
568 block_input (); 560 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)
3128 3128
3129 if (SELECTED_FRAME () != f) 3129 if (SELECTED_FRAME () != f)
3130 { 3130 {
3131 record_unwind_protect (select_frame_norecord, Fselected_frame ()); 3131 record_unwind_protect (select_frame_norecord, selected_frame);
3132 select_frame_norecord (frame); 3132 select_frame_norecord (frame);
3133 } 3133 }
3134 3134
@@ -3143,7 +3143,7 @@ run_window_configuration_change_hook (struct frame *f)
3143 buffer))) 3143 buffer)))
3144 { 3144 {
3145 ptrdiff_t inner_count = SPECPDL_INDEX (); 3145 ptrdiff_t inner_count = SPECPDL_INDEX ();
3146 record_unwind_protect (select_window_norecord, Fselected_window ()); 3146 record_unwind_protect (select_window_norecord, selected_window);
3147 select_window_norecord (window); 3147 select_window_norecord (window);
3148 run_funs (Fbuffer_local_value (Qwindow_configuration_change_hook, 3148 run_funs (Fbuffer_local_value (Qwindow_configuration_change_hook,
3149 buffer)); 3149 buffer));