Mercurial > emacs
comparison src/xmenu.c @ 40656:cdfd4d09b79a
Update usage of CHECK_ macros (remove unused second argument).
author | Pavel Janík <Pavel@Janik.cz> |
---|---|
date | Fri, 02 Nov 2001 20:46:55 +0000 |
parents | a56267e601e4 |
children | 63f97168400b |
comparison
equal
deleted
inserted
replaced
40655:45453187feeb | 40656:cdfd4d09b79a |
---|---|
617 for (tail = menu; !NILP (tail); tail = Fcdr (tail)) | 617 for (tail = menu; !NILP (tail); tail = Fcdr (tail)) |
618 { | 618 { |
619 Lisp_Object elt, pane_name, pane_data; | 619 Lisp_Object elt, pane_name, pane_data; |
620 elt = Fcar (tail); | 620 elt = Fcar (tail); |
621 pane_name = Fcar (elt); | 621 pane_name = Fcar (elt); |
622 CHECK_STRING (pane_name, 0); | 622 CHECK_STRING (pane_name); |
623 push_menu_pane (pane_name, Qnil); | 623 push_menu_pane (pane_name, Qnil); |
624 pane_data = Fcdr (elt); | 624 pane_data = Fcdr (elt); |
625 CHECK_CONS (pane_data, 0); | 625 CHECK_CONS (pane_data); |
626 list_of_items (pane_data); | 626 list_of_items (pane_data); |
627 } | 627 } |
628 | 628 |
629 finish_menu_items (); | 629 finish_menu_items (); |
630 } | 630 } |
644 push_menu_item (item, Qnil, Qnil, Qt, Qnil, Qnil, Qnil, Qnil); | 644 push_menu_item (item, Qnil, Qnil, Qt, Qnil, Qnil, Qnil, Qnil); |
645 else if (NILP (item)) | 645 else if (NILP (item)) |
646 push_left_right_boundary (); | 646 push_left_right_boundary (); |
647 else | 647 else |
648 { | 648 { |
649 CHECK_CONS (item, 0); | 649 CHECK_CONS (item); |
650 item1 = Fcar (item); | 650 item1 = Fcar (item); |
651 CHECK_STRING (item1, 1); | 651 CHECK_STRING (item1); |
652 push_menu_item (item1, Qt, Fcdr (item), Qt, Qnil, Qnil, Qnil, Qnil); | 652 push_menu_item (item1, Qt, Fcdr (item), Qt, Qnil, Qnil, Qnil, Qnil); |
653 } | 653 } |
654 } | 654 } |
655 } | 655 } |
656 | 656 |
748 x = Fcar (tem); | 748 x = Fcar (tem); |
749 y = Fcdr (tem); | 749 y = Fcdr (tem); |
750 } | 750 } |
751 } | 751 } |
752 | 752 |
753 CHECK_NUMBER (x, 0); | 753 CHECK_NUMBER (x); |
754 CHECK_NUMBER (y, 0); | 754 CHECK_NUMBER (y); |
755 | 755 |
756 /* Decode where to put the menu. */ | 756 /* Decode where to put the menu. */ |
757 | 757 |
758 if (FRAMEP (window)) | 758 if (FRAMEP (window)) |
759 { | 759 { |
761 xpos = 0; | 761 xpos = 0; |
762 ypos = 0; | 762 ypos = 0; |
763 } | 763 } |
764 else if (WINDOWP (window)) | 764 else if (WINDOWP (window)) |
765 { | 765 { |
766 CHECK_LIVE_WINDOW (window, 0); | 766 CHECK_LIVE_WINDOW (window); |
767 f = XFRAME (WINDOW_FRAME (XWINDOW (window))); | 767 f = XFRAME (WINDOW_FRAME (XWINDOW (window))); |
768 | 768 |
769 xpos = (FONT_WIDTH (FRAME_FONT (f)) | 769 xpos = (FONT_WIDTH (FRAME_FONT (f)) |
770 * XFASTINT (XWINDOW (window)->left)); | 770 * XFASTINT (XWINDOW (window)->left)); |
771 ypos = (FRAME_LINE_HEIGHT (f) | 771 ypos = (FRAME_LINE_HEIGHT (f) |
772 * XFASTINT (XWINDOW (window)->top)); | 772 * XFASTINT (XWINDOW (window)->top)); |
773 } | 773 } |
774 else | 774 else |
775 /* ??? Not really clean; should be CHECK_WINDOW_OR_FRAME, | 775 /* ??? Not really clean; should be CHECK_WINDOW_OR_FRAME, |
776 but I don't want to make one now. */ | 776 but I don't want to make one now. */ |
777 CHECK_WINDOW (window, 0); | 777 CHECK_WINDOW (window); |
778 | 778 |
779 xpos += XINT (x); | 779 xpos += XINT (x); |
780 ypos += XINT (y); | 780 ypos += XINT (y); |
781 | 781 |
782 XSETFRAME (Vmenu_updating_frame, f); | 782 XSETFRAME (Vmenu_updating_frame, f); |
844 } | 844 } |
845 else | 845 else |
846 { | 846 { |
847 /* We were given an old-fashioned menu. */ | 847 /* We were given an old-fashioned menu. */ |
848 title = Fcar (menu); | 848 title = Fcar (menu); |
849 CHECK_STRING (title, 1); | 849 CHECK_STRING (title); |
850 | 850 |
851 list_of_panes (Fcdr (menu)); | 851 list_of_panes (Fcdr (menu)); |
852 | 852 |
853 keymaps = 0; | 853 keymaps = 0; |
854 } | 854 } |
946 | 946 |
947 if (FRAMEP (window)) | 947 if (FRAMEP (window)) |
948 f = XFRAME (window); | 948 f = XFRAME (window); |
949 else if (WINDOWP (window)) | 949 else if (WINDOWP (window)) |
950 { | 950 { |
951 CHECK_LIVE_WINDOW (window, 0); | 951 CHECK_LIVE_WINDOW (window); |
952 f = XFRAME (WINDOW_FRAME (XWINDOW (window))); | 952 f = XFRAME (WINDOW_FRAME (XWINDOW (window))); |
953 } | 953 } |
954 else | 954 else |
955 /* ??? Not really clean; should be CHECK_WINDOW_OR_FRAME, | 955 /* ??? Not really clean; should be CHECK_WINDOW_OR_FRAME, |
956 but I don't want to make one now. */ | 956 but I don't want to make one now. */ |
957 CHECK_WINDOW (window, 0); | 957 CHECK_WINDOW (window); |
958 | 958 |
959 #ifndef USE_X_TOOLKIT | 959 #ifndef USE_X_TOOLKIT |
960 /* Display a menu with these alternatives | 960 /* Display a menu with these alternatives |
961 in the middle of frame F. */ | 961 in the middle of frame F. */ |
962 { | 962 { |
975 char *error_name; | 975 char *error_name; |
976 Lisp_Object selection; | 976 Lisp_Object selection; |
977 | 977 |
978 /* Decode the dialog items from what was specified. */ | 978 /* Decode the dialog items from what was specified. */ |
979 title = Fcar (contents); | 979 title = Fcar (contents); |
980 CHECK_STRING (title, 1); | 980 CHECK_STRING (title); |
981 | 981 |
982 list_of_panes (Fcons (contents, Qnil)); | 982 list_of_panes (Fcons (contents, Qnil)); |
983 | 983 |
984 /* Display them in a dialog box. */ | 984 /* Display them in a dialog box. */ |
985 BLOCK_INPUT; | 985 BLOCK_INPUT; |