Mercurial > emacs
changeset 9102:7a73653817de
(menu_item_enabled_p, single_keymap_panes, Fx_popup_menu, Fx_popup_dialog):
Use type test macros.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Tue, 27 Sep 1994 00:27:58 +0000 |
parents | 1cd322ea379a |
children | 948e8acb6990 |
files | src/xmenu.c |
diffstat | 1 files changed, 16 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xmenu.c Tue Sep 27 00:24:27 1994 +0000 +++ b/src/xmenu.c Tue Sep 27 00:27:58 1994 +0000 @@ -399,7 +399,7 @@ enabled = Qt; if (notreal) return enabled; - if (XTYPE (def) == Lisp_Symbol) + if (SYMBOLP (def)) { /* No property, or nil, means enable. Otherwise, enable if value is not nil. */ @@ -459,18 +459,18 @@ push_menu_pane (pane_name, prefix); - for (tail = keymap; XTYPE (tail) == Lisp_Cons; tail = XCONS (tail)->cdr) + for (tail = keymap; CONSP (tail); tail = XCONS (tail)->cdr) { /* Look at each key binding, and if it has a menu string, make a menu item from it. */ item = XCONS (tail)->car; - if (XTYPE (item) == Lisp_Cons) + if (CONSP (item)) { item1 = XCONS (item)->cdr; - if (XTYPE (item1) == Lisp_Cons) + if (CONSP (item1)) { item_string = XCONS (item1)->car; - if (XTYPE (item_string) == Lisp_String) + if (STRINGP (item_string)) { /* This is the real definition--the function to run. */ Lisp_Object def; @@ -527,7 +527,7 @@ } } } - else if (XTYPE (item) == Lisp_Vector) + else if (VECTORP (item)) { /* Loop over the char values represented in the vector. */ int len = XVECTOR (item)->size; @@ -537,10 +537,10 @@ Lisp_Object character; XFASTINT (character) = c; item1 = XVECTOR (item)->contents[c]; - if (XTYPE (item1) == Lisp_Cons) + if (CONSP (item1)) { item_string = XCONS (item1)->car; - if (XTYPE (item_string) == Lisp_String) + if (STRINGP (item_string)) { Lisp_Object def; @@ -737,7 +737,7 @@ else { tem = Fcar (position); - if (XTYPE (tem) == Lisp_Cons) + if (CONSP (tem)) { window = Fcar (Fcdr (position)); x = Fcar (tem); @@ -763,14 +763,14 @@ /* Decode where to put the menu. */ - if (XTYPE (window) == Lisp_Frame) + if (FRAMEP (window)) { f = XFRAME (window); xpos = 0; ypos = 0; } - else if (XTYPE (window) == Lisp_Window) + else if (WINDOWP (window)) { CHECK_LIVE_WINDOW (window, 0); f = XFRAME (WINDOW_FRAME (XWINDOW (window))); @@ -794,7 +794,7 @@ keymap = Fkeymapp (menu); tem = Qnil; - if (XTYPE (menu) == Lisp_Cons) + if (CONSP (menu)) tem = Fkeymapp (Fcar (menu)); if (!NILP (keymap)) { @@ -827,7 +827,7 @@ /* The first keymap that has a prompt string supplies the menu title. */ - for (tem = menu, i = 0; XTYPE (tem) == Lisp_Cons; tem = Fcdr (tem)) + for (tem = menu, i = 0; CONSP (tem); tem = Fcdr (tem)) { Lisp_Object prompt; @@ -929,7 +929,7 @@ { Lisp_Object tem; tem = Fcar (position); - if (XTYPE (tem) == Lisp_Cons) + if (CONSP (tem)) window = Fcar (Fcdr (position)); else { @@ -942,9 +942,9 @@ /* Decode where to put the menu. */ - if (XTYPE (window) == Lisp_Frame) + if (FRAMEP (window)) f = XFRAME (window); - else if (XTYPE (window) == Lisp_Window) + else if (WINDOWP (window)) { CHECK_LIVE_WINDOW (window, 0); f = XFRAME (WINDOW_FRAME (XWINDOW (window)));