diff options
| author | Gerd Moellmann | 1999-09-13 11:13:32 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 1999-09-13 11:13:32 +0000 |
| commit | 8d2666feec2a111be195f325f967e4344d0da885 (patch) | |
| tree | d0c72ef4922124e9cc77b378f299f8d53e1e4311 /src | |
| parent | 18f39d0e2073ecf318054c186da69bf6f3b8fea8 (diff) | |
| download | emacs-8d2666feec2a111be195f325f967e4344d0da885.tar.gz emacs-8d2666feec2a111be195f325f967e4344d0da885.zip | |
(Fmake_terminal_frame): Use SELECTED_FRAME.
(do_switch_frame): Change for Lisp_Object selected_frame.
(Fselected_frame): Ditto.
(Fframe_first_window): Use SELECTED_FRAME.
(Fframe_root_window): Change for Lisp_Object selected_frame.
(Fframe_selected_window, Fset_frame_selected_window, Fnext_frame,
Fprevious_frame, other_visible_frames, Fdelete_frame,
Fmouse_position, Fmouse_pixel_position, Fmake_frame_visible,
Fmake_frame_invisible, Ficonify_frame, Fraise_frame, Flower_frame,
Fframe_parameters, Fmodify_frame_parameters, Fframe_char_height,
Fframe_char_width, Fframe_pixel_height, Fframe_pixel_width,
Fset_frame_height, Fset_frame_width): Ditto.
Diffstat (limited to 'src')
| -rw-r--r-- | src/frame.c | 193 |
1 files changed, 90 insertions, 103 deletions
diff --git a/src/frame.c b/src/frame.c index 45cb23b6f22..f283c6ad0ee 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -587,25 +587,26 @@ Note that changing the size of one terminal frame automatically affects all.") | |||
| 587 | { | 587 | { |
| 588 | struct frame *f; | 588 | struct frame *f; |
| 589 | Lisp_Object frame, tem; | 589 | Lisp_Object frame, tem; |
| 590 | struct frame *sf = SELECTED_FRAME (); | ||
| 590 | 591 | ||
| 591 | #ifdef MSDOS | 592 | #ifdef MSDOS |
| 592 | if (selected_frame->output_method != output_msdos_raw) | 593 | if (sf->output_method != output_msdos_raw) |
| 593 | abort (); | 594 | abort (); |
| 594 | #else /* not MSDOS */ | 595 | #else /* not MSDOS */ |
| 595 | 596 | ||
| 596 | #ifdef macintosh | 597 | #ifdef macintosh |
| 597 | if (selected_frame->output_method != output_mac) | 598 | if (sf->output_method != output_mac) |
| 598 | error ("Not running on a Macintosh screen; cannot make a new Macintosh frame"); | 599 | error ("Not running on a Macintosh screen; cannot make a new Macintosh frame"); |
| 599 | #else | 600 | #else |
| 600 | if (selected_frame->output_method != output_termcap) | 601 | if (sf->output_method != output_termcap) |
| 601 | error ("Not using an ASCII terminal now; cannot make a new ASCII frame"); | 602 | error ("Not using an ASCII terminal now; cannot make a new ASCII frame"); |
| 602 | #endif | 603 | #endif |
| 603 | #endif /* not MSDOS */ | 604 | #endif /* not MSDOS */ |
| 604 | 605 | ||
| 605 | f = make_terminal_frame (); | 606 | f = make_terminal_frame (); |
| 606 | 607 | ||
| 607 | change_frame_size (f, FRAME_HEIGHT (selected_frame), | 608 | change_frame_size (f, FRAME_HEIGHT (sf), |
| 608 | FRAME_WIDTH (selected_frame), 0, 0, 0); | 609 | FRAME_WIDTH (sf), 0, 0, 0); |
| 609 | adjust_glyphs (f); | 610 | adjust_glyphs (f); |
| 610 | calculate_costs (f); | 611 | calculate_costs (f); |
| 611 | XSETFRAME (frame, f); | 612 | XSETFRAME (frame, f); |
| @@ -614,7 +615,7 @@ Note that changing the size of one terminal frame automatically affects all.") | |||
| 614 | 615 | ||
| 615 | /* Make the frame face alist be frame-specific, so that each | 616 | /* Make the frame face alist be frame-specific, so that each |
| 616 | frame could change its face definitions independently. */ | 617 | frame could change its face definitions independently. */ |
| 617 | f->face_alist = Fcopy_alist (selected_frame->face_alist); | 618 | f->face_alist = Fcopy_alist (sf->face_alist); |
| 618 | /* Simple Fcopy_alist isn't enough, because we need the contents of | 619 | /* Simple Fcopy_alist isn't enough, because we need the contents of |
| 619 | the vectors which are the CDRs of associations in face_alist to | 620 | the vectors which are the CDRs of associations in face_alist to |
| 620 | be copied as well. */ | 621 | be copied as well. */ |
| @@ -628,6 +629,8 @@ do_switch_frame (frame, no_enter, track) | |||
| 628 | Lisp_Object frame, no_enter; | 629 | Lisp_Object frame, no_enter; |
| 629 | int track; | 630 | int track; |
| 630 | { | 631 | { |
| 632 | struct frame *sf = SELECTED_FRAME (); | ||
| 633 | |||
| 631 | /* If FRAME is a switch-frame event, extract the frame we should | 634 | /* If FRAME is a switch-frame event, extract the frame we should |
| 632 | switch to. */ | 635 | switch to. */ |
| 633 | if (CONSP (frame) | 636 | if (CONSP (frame) |
| @@ -642,7 +645,7 @@ do_switch_frame (frame, no_enter, track) | |||
| 642 | if (! FRAME_LIVE_P (XFRAME (frame))) | 645 | if (! FRAME_LIVE_P (XFRAME (frame))) |
| 643 | return Qnil; | 646 | return Qnil; |
| 644 | 647 | ||
| 645 | if (selected_frame == XFRAME (frame)) | 648 | if (sf == XFRAME (frame)) |
| 646 | return frame; | 649 | return frame; |
| 647 | 650 | ||
| 648 | /* This is too greedy; it causes inappropriate focus redirection | 651 | /* This is too greedy; it causes inappropriate focus redirection |
| @@ -668,7 +671,7 @@ do_switch_frame (frame, no_enter, track) | |||
| 668 | 671 | ||
| 669 | focus = FRAME_FOCUS_FRAME (XFRAME (XCONS (tail)->car)); | 672 | focus = FRAME_FOCUS_FRAME (XFRAME (XCONS (tail)->car)); |
| 670 | 673 | ||
| 671 | if (FRAMEP (focus) && XFRAME (focus) == selected_frame) | 674 | if (FRAMEP (focus) && XFRAME (focus) == SELECTED_FRAME ()) |
| 672 | Fredirect_frame_focus (XCONS (tail)->car, frame); | 675 | Fredirect_frame_focus (XCONS (tail)->car, frame); |
| 673 | } | 676 | } |
| 674 | } | 677 | } |
| @@ -683,16 +686,16 @@ do_switch_frame (frame, no_enter, track) | |||
| 683 | if (FRAMEP (xfocus)) | 686 | if (FRAMEP (xfocus)) |
| 684 | { | 687 | { |
| 685 | focus = FRAME_FOCUS_FRAME (XFRAME (xfocus)); | 688 | focus = FRAME_FOCUS_FRAME (XFRAME (xfocus)); |
| 686 | if (FRAMEP (focus) && XFRAME (focus) == selected_frame) | 689 | if (FRAMEP (focus) && XFRAME (focus) == SELECTED_FRAME ()) |
| 687 | Fredirect_frame_focus (xfocus, frame); | 690 | Fredirect_frame_focus (xfocus, frame); |
| 688 | } | 691 | } |
| 689 | } | 692 | } |
| 690 | #endif /* HAVE_X_WINDOWS */ | 693 | #endif /* HAVE_X_WINDOWS */ |
| 691 | #endif /* ! 0 */ | 694 | #endif /* ! 0 */ |
| 692 | 695 | ||
| 693 | selected_frame = XFRAME (frame); | 696 | selected_frame = frame; |
| 694 | if (! FRAME_MINIBUF_ONLY_P (selected_frame)) | 697 | if (! FRAME_MINIBUF_ONLY_P (XFRAME (selected_frame))) |
| 695 | last_nonminibuf_frame = selected_frame; | 698 | last_nonminibuf_frame = XFRAME (selected_frame); |
| 696 | 699 | ||
| 697 | Fselect_window (XFRAME (frame)->selected_window); | 700 | Fselect_window (XFRAME (frame)->selected_window); |
| 698 | 701 | ||
| @@ -751,9 +754,7 @@ DEFUN ("selected-frame", Fselected_frame, Sselected_frame, 0, 0, 0, | |||
| 751 | "Return the frame that is now selected.") | 754 | "Return the frame that is now selected.") |
| 752 | () | 755 | () |
| 753 | { | 756 | { |
| 754 | Lisp_Object tem; | 757 | return selected_frame; |
| 755 | XSETFRAME (tem, selected_frame); | ||
| 756 | return tem; | ||
| 757 | } | 758 | } |
| 758 | 759 | ||
| 759 | DEFUN ("window-frame", Fwindow_frame, Swindow_frame, 1, 1, 0, | 760 | DEFUN ("window-frame", Fwindow_frame, Swindow_frame, 1, 1, 0, |
| @@ -774,7 +775,7 @@ If omitted, FRAME defaults to the currently selected frame.") | |||
| 774 | Lisp_Object w; | 775 | Lisp_Object w; |
| 775 | 776 | ||
| 776 | if (NILP (frame)) | 777 | if (NILP (frame)) |
| 777 | w = selected_frame->root_window; | 778 | w = SELECTED_FRAME ()->root_window; |
| 778 | else | 779 | else |
| 779 | { | 780 | { |
| 780 | CHECK_LIVE_FRAME (frame, 0); | 781 | CHECK_LIVE_FRAME (frame, 0); |
| @@ -806,12 +807,17 @@ If omitted, FRAME defaults to the currently selected frame.") | |||
| 806 | (frame) | 807 | (frame) |
| 807 | Lisp_Object frame; | 808 | Lisp_Object frame; |
| 808 | { | 809 | { |
| 810 | Lisp_Object window; | ||
| 811 | |||
| 809 | if (NILP (frame)) | 812 | if (NILP (frame)) |
| 810 | XSETFRAME (frame, selected_frame); | 813 | window = SELECTED_FRAME ()->root_window; |
| 811 | else | 814 | else |
| 812 | CHECK_LIVE_FRAME (frame, 0); | 815 | { |
| 813 | 816 | CHECK_LIVE_FRAME (frame, 0); | |
| 814 | return XFRAME (frame)->root_window; | 817 | window = XFRAME (frame)->root_window; |
| 818 | } | ||
| 819 | |||
| 820 | return window; | ||
| 815 | } | 821 | } |
| 816 | 822 | ||
| 817 | DEFUN ("frame-selected-window", Fframe_selected_window, | 823 | DEFUN ("frame-selected-window", Fframe_selected_window, |
| @@ -821,12 +827,17 @@ If omitted, FRAME defaults to the currently selected frame.") | |||
| 821 | (frame) | 827 | (frame) |
| 822 | Lisp_Object frame; | 828 | Lisp_Object frame; |
| 823 | { | 829 | { |
| 830 | Lisp_Object window; | ||
| 831 | |||
| 824 | if (NILP (frame)) | 832 | if (NILP (frame)) |
| 825 | XSETFRAME (frame, selected_frame); | 833 | window = SELECTED_FRAME ()->selected_window; |
| 826 | else | 834 | else |
| 827 | CHECK_LIVE_FRAME (frame, 0); | 835 | { |
| 836 | CHECK_LIVE_FRAME (frame, 0); | ||
| 837 | window = XFRAME (frame)->selected_window; | ||
| 838 | } | ||
| 828 | 839 | ||
| 829 | return XFRAME (frame)->selected_window; | 840 | return window; |
| 830 | } | 841 | } |
| 831 | 842 | ||
| 832 | DEFUN ("set-frame-selected-window", Fset_frame_selected_window, | 843 | DEFUN ("set-frame-selected-window", Fset_frame_selected_window, |
| @@ -838,16 +849,15 @@ If FRAME is the selected frame, this makes WINDOW the selected window.") | |||
| 838 | Lisp_Object frame, window; | 849 | Lisp_Object frame, window; |
| 839 | { | 850 | { |
| 840 | if (NILP (frame)) | 851 | if (NILP (frame)) |
| 841 | XSETFRAME (frame, selected_frame); | 852 | frame = selected_frame; |
| 842 | else | 853 | |
| 843 | CHECK_LIVE_FRAME (frame, 0); | 854 | CHECK_LIVE_FRAME (frame, 0); |
| 844 | |||
| 845 | CHECK_LIVE_WINDOW (window, 1); | 855 | CHECK_LIVE_WINDOW (window, 1); |
| 846 | 856 | ||
| 847 | if (! EQ (frame, WINDOW_FRAME (XWINDOW (window)))) | 857 | if (! EQ (frame, WINDOW_FRAME (XWINDOW (window)))) |
| 848 | error ("In `set-frame-selected-window', WINDOW is not on FRAME"); | 858 | error ("In `set-frame-selected-window', WINDOW is not on FRAME"); |
| 849 | 859 | ||
| 850 | if (XFRAME (frame) == selected_frame) | 860 | if (EQ (frame, selected_frame)) |
| 851 | return Fselect_window (window); | 861 | return Fselect_window (window); |
| 852 | 862 | ||
| 853 | return XFRAME (frame)->selected_window = window; | 863 | return XFRAME (frame)->selected_window = window; |
| @@ -1039,10 +1049,9 @@ Otherwise, include all frames.") | |||
| 1039 | Lisp_Object tail; | 1049 | Lisp_Object tail; |
| 1040 | 1050 | ||
| 1041 | if (NILP (frame)) | 1051 | if (NILP (frame)) |
| 1042 | XSETFRAME (frame, selected_frame); | 1052 | frame = selected_frame; |
| 1043 | else | 1053 | |
| 1044 | CHECK_LIVE_FRAME (frame, 0); | 1054 | CHECK_LIVE_FRAME (frame, 0); |
| 1045 | |||
| 1046 | return next_frame (frame, miniframe); | 1055 | return next_frame (frame, miniframe); |
| 1047 | } | 1056 | } |
| 1048 | 1057 | ||
| @@ -1063,10 +1072,8 @@ Otherwise, include all frames.") | |||
| 1063 | Lisp_Object tail; | 1072 | Lisp_Object tail; |
| 1064 | 1073 | ||
| 1065 | if (NILP (frame)) | 1074 | if (NILP (frame)) |
| 1066 | XSETFRAME (frame, selected_frame); | 1075 | frame = selected_frame; |
| 1067 | else | 1076 | CHECK_LIVE_FRAME (frame, 0); |
| 1068 | CHECK_LIVE_FRAME (frame, 0); | ||
| 1069 | |||
| 1070 | return prev_frame (frame, miniframe); | 1077 | return prev_frame (frame, miniframe); |
| 1071 | } | 1078 | } |
| 1072 | 1079 | ||
| @@ -1080,7 +1087,7 @@ other_visible_frames (f) | |||
| 1080 | { | 1087 | { |
| 1081 | /* We know the selected frame is visible, | 1088 | /* We know the selected frame is visible, |
| 1082 | so if F is some other frame, it can't be the sole visible one. */ | 1089 | so if F is some other frame, it can't be the sole visible one. */ |
| 1083 | if (f == selected_frame) | 1090 | if (f == SELECTED_FRAME ()) |
| 1084 | { | 1091 | { |
| 1085 | Lisp_Object frames; | 1092 | Lisp_Object frames; |
| 1086 | int count = 0; | 1093 | int count = 0; |
| @@ -1125,11 +1132,12 @@ but if the second optional argument FORCE is non-nil, you may do so.") | |||
| 1125 | Lisp_Object frame, force; | 1132 | Lisp_Object frame, force; |
| 1126 | { | 1133 | { |
| 1127 | struct frame *f; | 1134 | struct frame *f; |
| 1135 | struct frame *sf = SELECTED_FRAME (); | ||
| 1128 | int minibuffer_selected; | 1136 | int minibuffer_selected; |
| 1129 | 1137 | ||
| 1130 | if (EQ (frame, Qnil)) | 1138 | if (EQ (frame, Qnil)) |
| 1131 | { | 1139 | { |
| 1132 | f = selected_frame; | 1140 | f = sf; |
| 1133 | XSETFRAME (frame, f); | 1141 | XSETFRAME (frame, f); |
| 1134 | } | 1142 | } |
| 1135 | else | 1143 | else |
| @@ -1175,7 +1183,7 @@ but if the second optional argument FORCE is non-nil, you may do so.") | |||
| 1175 | minibuffer_selected = EQ (minibuf_window, selected_window); | 1183 | minibuffer_selected = EQ (minibuf_window, selected_window); |
| 1176 | 1184 | ||
| 1177 | /* Don't let the frame remain selected. */ | 1185 | /* Don't let the frame remain selected. */ |
| 1178 | if (f == selected_frame) | 1186 | if (f == sf) |
| 1179 | { | 1187 | { |
| 1180 | Lisp_Object tail, frame1; | 1188 | Lisp_Object tail, frame1; |
| 1181 | 1189 | ||
| @@ -1198,9 +1206,9 @@ but if the second optional argument FORCE is non-nil, you may do so.") | |||
| 1198 | /* Don't allow minibuf_window to remain on a deleted frame. */ | 1206 | /* Don't allow minibuf_window to remain on a deleted frame. */ |
| 1199 | if (EQ (f->minibuffer_window, minibuf_window)) | 1207 | if (EQ (f->minibuffer_window, minibuf_window)) |
| 1200 | { | 1208 | { |
| 1201 | Fset_window_buffer (selected_frame->minibuffer_window, | 1209 | Fset_window_buffer (sf->minibuffer_window, |
| 1202 | XWINDOW (minibuf_window)->buffer); | 1210 | XWINDOW (minibuf_window)->buffer); |
| 1203 | minibuf_window = selected_frame->minibuffer_window; | 1211 | minibuf_window = sf->minibuffer_window; |
| 1204 | 1212 | ||
| 1205 | /* If the dying minibuffer window was selected, | 1213 | /* If the dying minibuffer window was selected, |
| 1206 | select the new one. */ | 1214 | select the new one. */ |
| @@ -1372,7 +1380,7 @@ and nil for X and Y.") | |||
| 1372 | int col, row; | 1380 | int col, row; |
| 1373 | unsigned long long_dummy; | 1381 | unsigned long long_dummy; |
| 1374 | 1382 | ||
| 1375 | f = selected_frame; | 1383 | f = SELECTED_FRAME (); |
| 1376 | x = y = Qnil; | 1384 | x = y = Qnil; |
| 1377 | 1385 | ||
| 1378 | #ifdef HAVE_MOUSE | 1386 | #ifdef HAVE_MOUSE |
| @@ -1412,7 +1420,7 @@ and nil for X and Y.") | |||
| 1412 | int col, row; | 1420 | int col, row; |
| 1413 | unsigned long long_dummy; | 1421 | unsigned long long_dummy; |
| 1414 | 1422 | ||
| 1415 | f = selected_frame; | 1423 | f = SELECTED_FRAME (); |
| 1416 | x = y = Qnil; | 1424 | x = y = Qnil; |
| 1417 | 1425 | ||
| 1418 | #ifdef HAVE_MOUSE | 1426 | #ifdef HAVE_MOUSE |
| @@ -1504,7 +1512,7 @@ If omitted, FRAME defaults to the currently selected frame.") | |||
| 1504 | Lisp_Object frame; | 1512 | Lisp_Object frame; |
| 1505 | { | 1513 | { |
| 1506 | if (NILP (frame)) | 1514 | if (NILP (frame)) |
| 1507 | XSETFRAME (frame, selected_frame); | 1515 | frame = selected_frame; |
| 1508 | 1516 | ||
| 1509 | CHECK_LIVE_FRAME (frame, 0); | 1517 | CHECK_LIVE_FRAME (frame, 0); |
| 1510 | 1518 | ||
| @@ -1558,7 +1566,7 @@ but if the second optional argument FORCE is non-nil, you may do so.") | |||
| 1558 | Lisp_Object frame, force; | 1566 | Lisp_Object frame, force; |
| 1559 | { | 1567 | { |
| 1560 | if (NILP (frame)) | 1568 | if (NILP (frame)) |
| 1561 | XSETFRAME (frame, selected_frame); | 1569 | frame = selected_frame; |
| 1562 | 1570 | ||
| 1563 | CHECK_LIVE_FRAME (frame, 0); | 1571 | CHECK_LIVE_FRAME (frame, 0); |
| 1564 | 1572 | ||
| @@ -1567,16 +1575,17 @@ but if the second optional argument FORCE is non-nil, you may do so.") | |||
| 1567 | 1575 | ||
| 1568 | #if 0 /* This isn't logically necessary, and it can do GC. */ | 1576 | #if 0 /* This isn't logically necessary, and it can do GC. */ |
| 1569 | /* Don't let the frame remain selected. */ | 1577 | /* Don't let the frame remain selected. */ |
| 1570 | if (XFRAME (frame) == selected_frame) | 1578 | if (EQ (frame, selected_frame)) |
| 1571 | do_switch_frame (next_frame (frame, Qt), Qnil, 0) | 1579 | do_switch_frame (next_frame (frame, Qt), Qnil, 0) |
| 1572 | #endif | 1580 | #endif |
| 1573 | 1581 | ||
| 1574 | /* Don't allow minibuf_window to remain on a deleted frame. */ | 1582 | /* Don't allow minibuf_window to remain on a deleted frame. */ |
| 1575 | if (EQ (XFRAME (frame)->minibuffer_window, minibuf_window)) | 1583 | if (EQ (XFRAME (frame)->minibuffer_window, minibuf_window)) |
| 1576 | { | 1584 | { |
| 1577 | Fset_window_buffer (selected_frame->minibuffer_window, | 1585 | struct frame *sf = XFRAME (selected_frame); |
| 1586 | Fset_window_buffer (sf->minibuffer_window, | ||
| 1578 | XWINDOW (minibuf_window)->buffer); | 1587 | XWINDOW (minibuf_window)->buffer); |
| 1579 | minibuf_window = selected_frame->minibuffer_window; | 1588 | minibuf_window = sf->minibuffer_window; |
| 1580 | } | 1589 | } |
| 1581 | 1590 | ||
| 1582 | /* I think this should be done with a hook. */ | 1591 | /* I think this should be done with a hook. */ |
| @@ -1599,22 +1608,23 @@ If omitted, FRAME defaults to the currently selected frame.") | |||
| 1599 | Lisp_Object frame; | 1608 | Lisp_Object frame; |
| 1600 | { | 1609 | { |
| 1601 | if (NILP (frame)) | 1610 | if (NILP (frame)) |
| 1602 | XSETFRAME (frame, selected_frame); | 1611 | frame = selected_frame; |
| 1603 | 1612 | ||
| 1604 | CHECK_LIVE_FRAME (frame, 0); | 1613 | CHECK_LIVE_FRAME (frame, 0); |
| 1605 | 1614 | ||
| 1606 | #if 0 /* This isn't logically necessary, and it can do GC. */ | 1615 | #if 0 /* This isn't logically necessary, and it can do GC. */ |
| 1607 | /* Don't let the frame remain selected. */ | 1616 | /* Don't let the frame remain selected. */ |
| 1608 | if (XFRAME (frame) == selected_frame) | 1617 | if (EQ (frame, selected_frame)) |
| 1609 | Fhandle_switch_frame (next_frame (frame, Qt), Qnil); | 1618 | Fhandle_switch_frame (next_frame (frame, Qt), Qnil); |
| 1610 | #endif | 1619 | #endif |
| 1611 | 1620 | ||
| 1612 | /* Don't allow minibuf_window to remain on a deleted frame. */ | 1621 | /* Don't allow minibuf_window to remain on a deleted frame. */ |
| 1613 | if (EQ (XFRAME (frame)->minibuffer_window, minibuf_window)) | 1622 | if (EQ (XFRAME (frame)->minibuffer_window, minibuf_window)) |
| 1614 | { | 1623 | { |
| 1615 | Fset_window_buffer (selected_frame->minibuffer_window, | 1624 | struct frame *sf = XFRAME (selected_frame); |
| 1625 | Fset_window_buffer (sf->minibuffer_window, | ||
| 1616 | XWINDOW (minibuf_window)->buffer); | 1626 | XWINDOW (minibuf_window)->buffer); |
| 1617 | minibuf_window = selected_frame->minibuffer_window; | 1627 | minibuf_window = sf->minibuffer_window; |
| 1618 | } | 1628 | } |
| 1619 | 1629 | ||
| 1620 | /* I think this should be done with a hook. */ | 1630 | /* I think this should be done with a hook. */ |
| @@ -1682,7 +1692,7 @@ doesn't support multiple overlapping frames, this function does nothing.") | |||
| 1682 | Lisp_Object frame; | 1692 | Lisp_Object frame; |
| 1683 | { | 1693 | { |
| 1684 | if (NILP (frame)) | 1694 | if (NILP (frame)) |
| 1685 | XSETFRAME (frame, selected_frame); | 1695 | frame = selected_frame; |
| 1686 | 1696 | ||
| 1687 | CHECK_LIVE_FRAME (frame, 0); | 1697 | CHECK_LIVE_FRAME (frame, 0); |
| 1688 | 1698 | ||
| @@ -1705,7 +1715,7 @@ doesn't support multiple overlapping frames, this function does nothing.") | |||
| 1705 | Lisp_Object frame; | 1715 | Lisp_Object frame; |
| 1706 | { | 1716 | { |
| 1707 | if (NILP (frame)) | 1717 | if (NILP (frame)) |
| 1708 | XSETFRAME (frame, selected_frame); | 1718 | frame = selected_frame; |
| 1709 | 1719 | ||
| 1710 | CHECK_LIVE_FRAME (frame, 0); | 1720 | CHECK_LIVE_FRAME (frame, 0); |
| 1711 | 1721 | ||
| @@ -1981,12 +1991,10 @@ If FRAME is omitted, return information on the currently selected frame.") | |||
| 1981 | int height, width; | 1991 | int height, width; |
| 1982 | 1992 | ||
| 1983 | if (EQ (frame, Qnil)) | 1993 | if (EQ (frame, Qnil)) |
| 1984 | f = selected_frame; | 1994 | frame = selected_frame; |
| 1985 | else | 1995 | |
| 1986 | { | 1996 | CHECK_FRAME (frame, 0); |
| 1987 | CHECK_FRAME (frame, 0); | 1997 | f = XFRAME (frame); |
| 1988 | f = XFRAME (frame); | ||
| 1989 | } | ||
| 1990 | 1998 | ||
| 1991 | if (!FRAME_LIVE_P (f)) | 1999 | if (!FRAME_LIVE_P (f)) |
| 1992 | return Qnil; | 2000 | return Qnil; |
| @@ -2021,7 +2029,7 @@ If FRAME is omitted, return information on the currently selected frame.") | |||
| 2021 | : FRAME_MINIBUF_WINDOW (f))); | 2029 | : FRAME_MINIBUF_WINDOW (f))); |
| 2022 | store_in_alist (&alist, Qunsplittable, (FRAME_NO_SPLIT_P (f) ? Qt : Qnil)); | 2030 | store_in_alist (&alist, Qunsplittable, (FRAME_NO_SPLIT_P (f) ? Qt : Qnil)); |
| 2023 | store_in_alist (&alist, Qbuffer_list, | 2031 | store_in_alist (&alist, Qbuffer_list, |
| 2024 | frame_buffer_list (Fselected_frame ())); | 2032 | frame_buffer_list (selected_frame)); |
| 2025 | 2033 | ||
| 2026 | /* I think this should be done with a hook. */ | 2034 | /* I think this should be done with a hook. */ |
| 2027 | #ifdef HAVE_WINDOW_SYSTEM | 2035 | #ifdef HAVE_WINDOW_SYSTEM |
| @@ -2053,12 +2061,9 @@ so that `frame-parameters' will return them.") | |||
| 2053 | register Lisp_Object tail, elt, prop, val; | 2061 | register Lisp_Object tail, elt, prop, val; |
| 2054 | 2062 | ||
| 2055 | if (EQ (frame, Qnil)) | 2063 | if (EQ (frame, Qnil)) |
| 2056 | f = selected_frame; | 2064 | frame = selected_frame; |
| 2057 | else | 2065 | CHECK_LIVE_FRAME (frame, 0); |
| 2058 | { | 2066 | f = XFRAME (frame); |
| 2059 | CHECK_LIVE_FRAME (frame, 0); | ||
| 2060 | f = XFRAME (frame); | ||
| 2061 | } | ||
| 2062 | 2067 | ||
| 2063 | /* I think this should be done with a hook. */ | 2068 | /* I think this should be done with a hook. */ |
| 2064 | #ifdef HAVE_WINDOW_SYSTEM | 2069 | #ifdef HAVE_WINDOW_SYSTEM |
| @@ -2121,12 +2126,9 @@ For a terminal frame, the value is always 1.") | |||
| 2121 | struct frame *f; | 2126 | struct frame *f; |
| 2122 | 2127 | ||
| 2123 | if (NILP (frame)) | 2128 | if (NILP (frame)) |
| 2124 | f = selected_frame; | 2129 | frame = selected_frame; |
| 2125 | else | 2130 | CHECK_FRAME (frame, 0); |
| 2126 | { | 2131 | f = XFRAME (frame); |
| 2127 | CHECK_FRAME (frame, 0); | ||
| 2128 | f = XFRAME (frame); | ||
| 2129 | } | ||
| 2130 | 2132 | ||
| 2131 | #ifdef HAVE_WINDOW_SYSTEM | 2133 | #ifdef HAVE_WINDOW_SYSTEM |
| 2132 | if (FRAME_WINDOW_P (f)) | 2134 | if (FRAME_WINDOW_P (f)) |
| @@ -2150,12 +2152,9 @@ For a terminal screen, the value is always 1.") | |||
| 2150 | struct frame *f; | 2152 | struct frame *f; |
| 2151 | 2153 | ||
| 2152 | if (NILP (frame)) | 2154 | if (NILP (frame)) |
| 2153 | f = selected_frame; | 2155 | frame = selected_frame; |
| 2154 | else | 2156 | CHECK_FRAME (frame, 0); |
| 2155 | { | 2157 | f = XFRAME (frame); |
| 2156 | CHECK_FRAME (frame, 0); | ||
| 2157 | f = XFRAME (frame); | ||
| 2158 | } | ||
| 2159 | 2158 | ||
| 2160 | #ifdef HAVE_WINDOW_SYSTEM | 2159 | #ifdef HAVE_WINDOW_SYSTEM |
| 2161 | if (FRAME_WINDOW_P (f)) | 2160 | if (FRAME_WINDOW_P (f)) |
| @@ -2178,12 +2177,9 @@ If FRAME is omitted, the selected frame is used.") | |||
| 2178 | struct frame *f; | 2177 | struct frame *f; |
| 2179 | 2178 | ||
| 2180 | if (NILP (frame)) | 2179 | if (NILP (frame)) |
| 2181 | f = selected_frame; | 2180 | frame = selected_frame; |
| 2182 | else | 2181 | CHECK_FRAME (frame, 0); |
| 2183 | { | 2182 | f = XFRAME (frame); |
| 2184 | CHECK_FRAME (frame, 0); | ||
| 2185 | f = XFRAME (frame); | ||
| 2186 | } | ||
| 2187 | 2183 | ||
| 2188 | #ifdef HAVE_WINDOW_SYSTEM | 2184 | #ifdef HAVE_WINDOW_SYSTEM |
| 2189 | if (FRAME_WINDOW_P (f)) | 2185 | if (FRAME_WINDOW_P (f)) |
| @@ -2204,12 +2200,9 @@ If FRAME is omitted, the selected frame is used.") | |||
| 2204 | struct frame *f; | 2200 | struct frame *f; |
| 2205 | 2201 | ||
| 2206 | if (NILP (frame)) | 2202 | if (NILP (frame)) |
| 2207 | f = selected_frame; | 2203 | frame = selected_frame; |
| 2208 | else | 2204 | CHECK_FRAME (frame, 0); |
| 2209 | { | 2205 | f = XFRAME (frame); |
| 2210 | CHECK_FRAME (frame, 0); | ||
| 2211 | f = XFRAME (frame); | ||
| 2212 | } | ||
| 2213 | 2206 | ||
| 2214 | #ifdef HAVE_WINDOW_SYSTEM | 2207 | #ifdef HAVE_WINDOW_SYSTEM |
| 2215 | if (FRAME_WINDOW_P (f)) | 2208 | if (FRAME_WINDOW_P (f)) |
| @@ -2230,12 +2223,9 @@ but that the idea of the actual height of the frame should not be changed.") | |||
| 2230 | 2223 | ||
| 2231 | CHECK_NUMBER (lines, 0); | 2224 | CHECK_NUMBER (lines, 0); |
| 2232 | if (NILP (frame)) | 2225 | if (NILP (frame)) |
| 2233 | f = selected_frame; | 2226 | frame = selected_frame; |
| 2234 | else | 2227 | CHECK_LIVE_FRAME (frame, 0); |
| 2235 | { | 2228 | f = XFRAME (frame); |
| 2236 | CHECK_LIVE_FRAME (frame, 0); | ||
| 2237 | f = XFRAME (frame); | ||
| 2238 | } | ||
| 2239 | 2229 | ||
| 2240 | /* I think this should be done with a hook. */ | 2230 | /* I think this should be done with a hook. */ |
| 2241 | #ifdef HAVE_WINDOW_SYSTEM | 2231 | #ifdef HAVE_WINDOW_SYSTEM |
| @@ -2261,12 +2251,9 @@ but that the idea of the actual width of the frame should not be changed.") | |||
| 2261 | register struct frame *f; | 2251 | register struct frame *f; |
| 2262 | CHECK_NUMBER (cols, 0); | 2252 | CHECK_NUMBER (cols, 0); |
| 2263 | if (NILP (frame)) | 2253 | if (NILP (frame)) |
| 2264 | f = selected_frame; | 2254 | frame = selected_frame; |
| 2265 | else | 2255 | CHECK_LIVE_FRAME (frame, 0); |
| 2266 | { | 2256 | f = XFRAME (frame); |
| 2267 | CHECK_LIVE_FRAME (frame, 0); | ||
| 2268 | f = XFRAME (frame); | ||
| 2269 | } | ||
| 2270 | 2257 | ||
| 2271 | /* I think this should be done with a hook. */ | 2258 | /* I think this should be done with a hook. */ |
| 2272 | #ifdef HAVE_WINDOW_SYSTEM | 2259 | #ifdef HAVE_WINDOW_SYSTEM |