aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1994-09-27 00:27:58 +0000
committerKarl Heuer1994-09-27 00:27:58 +0000
commitb5bb2705dc3f98c61db1b896481b414da4b4913d (patch)
tree16ec7520b3e5cecc3e25447b524e1cdeabd6ee80
parent9bc4522e80efc6bd5c24d71a0d62c43cef2e1cff (diff)
downloademacs-b5bb2705dc3f98c61db1b896481b414da4b4913d.tar.gz
emacs-b5bb2705dc3f98c61db1b896481b414da4b4913d.zip
(menu_item_enabled_p, single_keymap_panes, Fx_popup_menu, Fx_popup_dialog):
Use type test macros.
-rw-r--r--src/xmenu.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/xmenu.c b/src/xmenu.c
index ec0695a4ae6..c78f8f59aff 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -399,7 +399,7 @@ menu_item_enabled_p (def, notreal)
399 enabled = Qt; 399 enabled = Qt;
400 if (notreal) 400 if (notreal)
401 return enabled; 401 return enabled;
402 if (XTYPE (def) == Lisp_Symbol) 402 if (SYMBOLP (def))
403 { 403 {
404 /* No property, or nil, means enable. 404 /* No property, or nil, means enable.
405 Otherwise, enable if value is not nil. */ 405 Otherwise, enable if value is not nil. */
@@ -459,18 +459,18 @@ single_keymap_panes (keymap, pane_name, prefix, notreal)
459 459
460 push_menu_pane (pane_name, prefix); 460 push_menu_pane (pane_name, prefix);
461 461
462 for (tail = keymap; XTYPE (tail) == Lisp_Cons; tail = XCONS (tail)->cdr) 462 for (tail = keymap; CONSP (tail); tail = XCONS (tail)->cdr)
463 { 463 {
464 /* Look at each key binding, and if it has a menu string, 464 /* Look at each key binding, and if it has a menu string,
465 make a menu item from it. */ 465 make a menu item from it. */
466 item = XCONS (tail)->car; 466 item = XCONS (tail)->car;
467 if (XTYPE (item) == Lisp_Cons) 467 if (CONSP (item))
468 { 468 {
469 item1 = XCONS (item)->cdr; 469 item1 = XCONS (item)->cdr;
470 if (XTYPE (item1) == Lisp_Cons) 470 if (CONSP (item1))
471 { 471 {
472 item_string = XCONS (item1)->car; 472 item_string = XCONS (item1)->car;
473 if (XTYPE (item_string) == Lisp_String) 473 if (STRINGP (item_string))
474 { 474 {
475 /* This is the real definition--the function to run. */ 475 /* This is the real definition--the function to run. */
476 Lisp_Object def; 476 Lisp_Object def;
@@ -527,7 +527,7 @@ single_keymap_panes (keymap, pane_name, prefix, notreal)
527 } 527 }
528 } 528 }
529 } 529 }
530 else if (XTYPE (item) == Lisp_Vector) 530 else if (VECTORP (item))
531 { 531 {
532 /* Loop over the char values represented in the vector. */ 532 /* Loop over the char values represented in the vector. */
533 int len = XVECTOR (item)->size; 533 int len = XVECTOR (item)->size;
@@ -537,10 +537,10 @@ single_keymap_panes (keymap, pane_name, prefix, notreal)
537 Lisp_Object character; 537 Lisp_Object character;
538 XFASTINT (character) = c; 538 XFASTINT (character) = c;
539 item1 = XVECTOR (item)->contents[c]; 539 item1 = XVECTOR (item)->contents[c];
540 if (XTYPE (item1) == Lisp_Cons) 540 if (CONSP (item1))
541 { 541 {
542 item_string = XCONS (item1)->car; 542 item_string = XCONS (item1)->car;
543 if (XTYPE (item_string) == Lisp_String) 543 if (STRINGP (item_string))
544 { 544 {
545 Lisp_Object def; 545 Lisp_Object def;
546 546
@@ -737,7 +737,7 @@ cached information about equivalent key sequences.")
737 else 737 else
738 { 738 {
739 tem = Fcar (position); 739 tem = Fcar (position);
740 if (XTYPE (tem) == Lisp_Cons) 740 if (CONSP (tem))
741 { 741 {
742 window = Fcar (Fcdr (position)); 742 window = Fcar (Fcdr (position));
743 x = Fcar (tem); 743 x = Fcar (tem);
@@ -763,14 +763,14 @@ cached information about equivalent key sequences.")
763 763
764 /* Decode where to put the menu. */ 764 /* Decode where to put the menu. */
765 765
766 if (XTYPE (window) == Lisp_Frame) 766 if (FRAMEP (window))
767 { 767 {
768 f = XFRAME (window); 768 f = XFRAME (window);
769 769
770 xpos = 0; 770 xpos = 0;
771 ypos = 0; 771 ypos = 0;
772 } 772 }
773 else if (XTYPE (window) == Lisp_Window) 773 else if (WINDOWP (window))
774 { 774 {
775 CHECK_LIVE_WINDOW (window, 0); 775 CHECK_LIVE_WINDOW (window, 0);
776 f = XFRAME (WINDOW_FRAME (XWINDOW (window))); 776 f = XFRAME (WINDOW_FRAME (XWINDOW (window)));
@@ -794,7 +794,7 @@ cached information about equivalent key sequences.")
794 794
795 keymap = Fkeymapp (menu); 795 keymap = Fkeymapp (menu);
796 tem = Qnil; 796 tem = Qnil;
797 if (XTYPE (menu) == Lisp_Cons) 797 if (CONSP (menu))
798 tem = Fkeymapp (Fcar (menu)); 798 tem = Fkeymapp (Fcar (menu));
799 if (!NILP (keymap)) 799 if (!NILP (keymap))
800 { 800 {
@@ -827,7 +827,7 @@ cached information about equivalent key sequences.")
827 827
828 /* The first keymap that has a prompt string 828 /* The first keymap that has a prompt string
829 supplies the menu title. */ 829 supplies the menu title. */
830 for (tem = menu, i = 0; XTYPE (tem) == Lisp_Cons; tem = Fcdr (tem)) 830 for (tem = menu, i = 0; CONSP (tem); tem = Fcdr (tem))
831 { 831 {
832 Lisp_Object prompt; 832 Lisp_Object prompt;
833 833
@@ -929,7 +929,7 @@ on the left of the dialog box and all following items on the right.\n\
929 { 929 {
930 Lisp_Object tem; 930 Lisp_Object tem;
931 tem = Fcar (position); 931 tem = Fcar (position);
932 if (XTYPE (tem) == Lisp_Cons) 932 if (CONSP (tem))
933 window = Fcar (Fcdr (position)); 933 window = Fcar (Fcdr (position));
934 else 934 else
935 { 935 {
@@ -942,9 +942,9 @@ on the left of the dialog box and all following items on the right.\n\
942 942
943 /* Decode where to put the menu. */ 943 /* Decode where to put the menu. */
944 944
945 if (XTYPE (window) == Lisp_Frame) 945 if (FRAMEP (window))
946 f = XFRAME (window); 946 f = XFRAME (window);
947 else if (XTYPE (window) == Lisp_Window) 947 else if (WINDOWP (window))
948 { 948 {
949 CHECK_LIVE_WINDOW (window, 0); 949 CHECK_LIVE_WINDOW (window, 0);
950 f = XFRAME (WINDOW_FRAME (XWINDOW (window))); 950 f = XFRAME (WINDOW_FRAME (XWINDOW (window)));