aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Rudalics2008-11-02 10:38:42 +0000
committerMartin Rudalics2008-11-02 10:38:42 +0000
commit216e6a14976d8d9b17545573daa14f95b394a451 (patch)
tree7c613edc9b30698ed27d8b0fc039413e47de2eb4 /src
parent9020b223112988d942a8cc724472659e74b7065d (diff)
downloademacs-216e6a14976d8d9b17545573daa14f95b394a451.tar.gz
emacs-216e6a14976d8d9b17545573daa14f95b394a451.zip
(do_switch_frame): New argument NORECORD passed to Fselect_window.
(Fselect_frame): New argument NORECORD passed to do_switch_frame. (Fset_frame_selected_window): New argument NORECORD passed to Fselect_frame. (Fhandle_switch_frame, Fdelete_frame): Handle NORECORD argument in call of do_switch_frame. (Fset_mouse_position, Fset_mouse_pixel_position, Fraise_frame): Handle NORECORD argument in call of Fselect_frame.
Diffstat (limited to 'src')
-rw-r--r--src/frame.c72
1 files changed, 40 insertions, 32 deletions
diff --git a/src/frame.c b/src/frame.c
index f92eeaf6288..6704e9f67c2 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -784,11 +784,13 @@ affects all frames on the same terminal device. */)
784 784
785 FOR_DELETION non-zero means that the selected frame is being 785 FOR_DELETION non-zero means that the selected frame is being
786 deleted, which includes the possibility that the frame's terminal 786 deleted, which includes the possibility that the frame's terminal
787 is dead. */ 787 is dead.
788
789 The value of NORECORD is passed as argument to Fselect_window. */
788 790
789Lisp_Object 791Lisp_Object
790do_switch_frame (frame, track, for_deletion) 792do_switch_frame (frame, track, for_deletion, norecord)
791 Lisp_Object frame; 793 Lisp_Object frame, norecord;
792 int track, for_deletion; 794 int track, for_deletion;
793{ 795{
794 struct frame *sf = SELECTED_FRAME (); 796 struct frame *sf = SELECTED_FRAME ();
@@ -871,7 +873,7 @@ do_switch_frame (frame, track, for_deletion)
871 if (! FRAME_MINIBUF_ONLY_P (XFRAME (selected_frame))) 873 if (! FRAME_MINIBUF_ONLY_P (XFRAME (selected_frame)))
872 last_nonminibuf_frame = XFRAME (selected_frame); 874 last_nonminibuf_frame = XFRAME (selected_frame);
873 875
874 Fselect_window (XFRAME (frame)->selected_window, Qnil); 876 Fselect_window (XFRAME (frame)->selected_window, norecord);
875 877
876#ifdef NS_IMPL_COCOA 878#ifdef NS_IMPL_COCOA
877 /* term gets no other notification of this */ 879 /* term gets no other notification of this */
@@ -890,21 +892,25 @@ do_switch_frame (frame, track, for_deletion)
890 return frame; 892 return frame;
891} 893}
892 894
893DEFUN ("select-frame", Fselect_frame, Sselect_frame, 1, 1, "e", 895DEFUN ("select-frame", Fselect_frame, Sselect_frame, 1, 2, "e",
894 doc: /* Select the frame FRAME. 896 doc: /* Select FRAME.
895Subsequent editing commands apply to its selected window. 897Subsequent editing commands apply to its selected window.
898Optional argument NORECORD means to neither change the order of
899recently selected windows nor the buffer list.
900
896The selection of FRAME lasts until the next time the user does 901The selection of FRAME lasts until the next time the user does
897something to select a different frame, or until the next time this 902something to select a different frame, or until the next time
898function is called. If you are using a window system, the previously 903this function is called. If you are using a window system, the
899selected frame may be restored as the selected frame after return to 904previously selected frame may be restored as the selected frame
900the command loop, because it still may have the window system's input 905after return to the command loop, because it still may have the
901focus. On a text-only terminal, the next redisplay will display FRAME. 906window system's input focus. On a text-only terminal, the next
907redisplay will display FRAME.
902 908
903This function returns FRAME, or nil if FRAME has been deleted. */) 909This function returns FRAME, or nil if FRAME has been deleted. */)
904 (frame) 910 (frame, norecord)
905 Lisp_Object frame; 911 Lisp_Object frame, norecord;
906{ 912{
907 return do_switch_frame (frame, 1, 0); 913 return do_switch_frame (frame, 1, 0, norecord);
908} 914}
909 915
910 916
@@ -923,7 +929,7 @@ to that frame. */)
923 /* Preserve prefix arg that the command loop just cleared. */ 929 /* Preserve prefix arg that the command loop just cleared. */
924 current_kboard->Vprefix_arg = Vcurrent_prefix_arg; 930 current_kboard->Vprefix_arg = Vcurrent_prefix_arg;
925 call1 (Vrun_hooks, Qmouse_leave_buffer_hook); 931 call1 (Vrun_hooks, Qmouse_leave_buffer_hook);
926 return do_switch_frame (event, 0, 0); 932 return do_switch_frame (event, 0, 0, Qnil);
927} 933}
928 934
929DEFUN ("selected-frame", Fselected_frame, Sselected_frame, 0, 0, 0, 935DEFUN ("selected-frame", Fselected_frame, Sselected_frame, 0, 0, 0,
@@ -998,8 +1004,8 @@ If omitted, FRAME defaults to the currently selected frame. */)
998 1004
999DEFUN ("frame-selected-window", Fframe_selected_window, 1005DEFUN ("frame-selected-window", Fframe_selected_window,
1000 Sframe_selected_window, 0, 1, 0, 1006 Sframe_selected_window, 0, 1, 0,
1001 doc: /* Return the selected window of frame object FRAME. 1007 doc: /* Return the selected window of FRAME.
1002If omitted, FRAME defaults to the currently selected frame. */) 1008FRAME defaults to the currently selected frame. */)
1003 (frame) 1009 (frame)
1004 Lisp_Object frame; 1010 Lisp_Object frame;
1005{ 1011{
@@ -1017,13 +1023,15 @@ If omitted, FRAME defaults to the currently selected frame. */)
1017} 1023}
1018 1024
1019DEFUN ("set-frame-selected-window", Fset_frame_selected_window, 1025DEFUN ("set-frame-selected-window", Fset_frame_selected_window,
1020 Sset_frame_selected_window, 2, 2, 0, 1026 Sset_frame_selected_window, 2, 3, 0,
1021 doc: /* Set the selected window of frame object FRAME to WINDOW. 1027 doc: /* Set selected window of FRAME to WINDOW.
1022Return WINDOW. 1028If FRAME is nil, use the selected frame. If FRAME is the
1023If FRAME is nil, the selected frame is used. 1029selected frame, this makes WINDOW the selected window.
1024If FRAME is the selected frame, this makes WINDOW the selected window. */) 1030Optional argument NORECORD non-nil means to neither change the
1025 (frame, window) 1031order of recently selected windows nor the buffer list.
1026 Lisp_Object frame, window; 1032Return WINDOW. */)
1033 (frame, window, norecord)
1034 Lisp_Object frame, window, norecord;
1027{ 1035{
1028 if (NILP (frame)) 1036 if (NILP (frame))
1029 frame = selected_frame; 1037 frame = selected_frame;
@@ -1035,7 +1043,7 @@ If FRAME is the selected frame, this makes WINDOW the selected window. */)
1035 error ("In `set-frame-selected-window', WINDOW is not on FRAME"); 1043 error ("In `set-frame-selected-window', WINDOW is not on FRAME");
1036 1044
1037 if (EQ (frame, selected_frame)) 1045 if (EQ (frame, selected_frame))
1038 return Fselect_window (window, Qnil); 1046 return Fselect_window (window, norecord);
1039 1047
1040 return XFRAME (frame)->selected_window = window; 1048 return XFRAME (frame)->selected_window = window;
1041} 1049}
@@ -1426,7 +1434,7 @@ But FORCE inhibits this too. */)
1426 } 1434 }
1427 } 1435 }
1428 1436
1429 do_switch_frame (frame1, 0, 1); 1437 do_switch_frame (frame1, 0, 1, Qnil);
1430 sf = SELECTED_FRAME (); 1438 sf = SELECTED_FRAME ();
1431 } 1439 }
1432 1440
@@ -1739,13 +1747,13 @@ before calling this function on it, like this.
1739#if defined (MSDOS) && defined (HAVE_MOUSE) 1747#if defined (MSDOS) && defined (HAVE_MOUSE)
1740 if (FRAME_MSDOS_P (XFRAME (frame))) 1748 if (FRAME_MSDOS_P (XFRAME (frame)))
1741 { 1749 {
1742 Fselect_frame (frame); 1750 Fselect_frame (frame, Qnil);
1743 mouse_moveto (XINT (x), XINT (y)); 1751 mouse_moveto (XINT (x), XINT (y));
1744 } 1752 }
1745#else 1753#else
1746#ifdef HAVE_GPM 1754#ifdef HAVE_GPM
1747 { 1755 {
1748 Fselect_frame (frame); 1756 Fselect_frame (frame, Qnil);
1749 term_mouse_moveto (XINT (x), XINT (y)); 1757 term_mouse_moveto (XINT (x), XINT (y));
1750 } 1758 }
1751#endif 1759#endif
@@ -1781,13 +1789,13 @@ before calling this function on it, like this.
1781#if defined (MSDOS) && defined (HAVE_MOUSE) 1789#if defined (MSDOS) && defined (HAVE_MOUSE)
1782 if (FRAME_MSDOS_P (XFRAME (frame))) 1790 if (FRAME_MSDOS_P (XFRAME (frame)))
1783 { 1791 {
1784 Fselect_frame (frame); 1792 Fselect_frame (frame, Qnil);
1785 mouse_moveto (XINT (x), XINT (y)); 1793 mouse_moveto (XINT (x), XINT (y));
1786 } 1794 }
1787#else 1795#else
1788#ifdef HAVE_GPM 1796#ifdef HAVE_GPM
1789 { 1797 {
1790 Fselect_frame (frame); 1798 Fselect_frame (frame, Qnil);
1791 term_mouse_moveto (XINT (x), XINT (y)); 1799 term_mouse_moveto (XINT (x), XINT (y));
1792 } 1800 }
1793#endif 1801#endif
@@ -1871,7 +1879,7 @@ but if the second optional argument FORCE is non-nil, you may do so. */)
1871#if 0 /* This isn't logically necessary, and it can do GC. */ 1879#if 0 /* This isn't logically necessary, and it can do GC. */
1872 /* Don't let the frame remain selected. */ 1880 /* Don't let the frame remain selected. */
1873 if (EQ (frame, selected_frame)) 1881 if (EQ (frame, selected_frame))
1874 do_switch_frame (next_frame (frame, Qt), 0, 0) 1882 do_switch_frame (next_frame (frame, Qt), 0, 0, Qnil)
1875#endif 1883#endif
1876 1884
1877 /* Don't allow minibuf_window to remain on a deleted frame. */ 1885 /* Don't allow minibuf_window to remain on a deleted frame. */
@@ -2000,7 +2008,7 @@ doesn't support multiple overlapping frames, this function selects FRAME. */)
2000 2008
2001 if (FRAME_TERMCAP_P (f)) 2009 if (FRAME_TERMCAP_P (f))
2002 /* On a text-only terminal select FRAME. */ 2010 /* On a text-only terminal select FRAME. */
2003 Fselect_frame (frame); 2011 Fselect_frame (frame, Qnil);
2004 else 2012 else
2005 /* Do like the documentation says. */ 2013 /* Do like the documentation says. */
2006 Fmake_frame_visible (frame); 2014 Fmake_frame_visible (frame);