Mercurial > hg > xemacs-beta
comparison src/menubar.c @ 272:c5d627a313b1 r21-0b34
Import from CVS: tag r21-0b34
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:28:48 +0200 |
parents | b2472a1930f2 |
children | 19dcec799385 |
comparison
equal
deleted
inserted
replaced
271:c7b7086b0a39 | 272:c5d627a313b1 |
---|---|
104 Lisp_Object | 104 Lisp_Object |
105 menu_parse_submenu_keywords (Lisp_Object desc, struct gui_item* pgui_item) | 105 menu_parse_submenu_keywords (Lisp_Object desc, struct gui_item* pgui_item) |
106 { | 106 { |
107 /* Menu descriptor should be a list */ | 107 /* Menu descriptor should be a list */ |
108 CHECK_CONS (desc); | 108 CHECK_CONS (desc); |
109 | 109 |
110 /* First element may be menu name, although can be omitted. | 110 /* First element may be menu name, although can be omitted. |
111 Let's think that if stuff begins with anything than a keyword | 111 Let's think that if stuff begins with anything than a keyword |
112 or a list (submenu), this is a menu name, expected to be a stirng */ | 112 or a list (submenu), this is a menu name, expected to be a stirng */ |
113 if (!KEYWORDP (XCAR (desc)) && !CONSP (XCAR (desc))) | 113 if (!KEYWORDP (XCAR (desc)) && !CONSP (XCAR (desc))) |
114 { | 114 { |
144 and :included keywords in the DESC, and expands submenus along the | 144 and :included keywords in the DESC, and expands submenus along the |
145 PATH using :filter functions. Return value is a descriptor for the | 145 PATH using :filter functions. Return value is a descriptor for the |
146 submenu, NOT expanded and NOT checked against :config and :included. | 146 submenu, NOT expanded and NOT checked against :config and :included. |
147 Also, individual menu items are not looked for, only submenus. | 147 Also, individual menu items are not looked for, only submenus. |
148 | 148 |
149 See also 'find-menu-item' | 149 See also 'find-menu-item'. |
150 */ | 150 */ |
151 (desc, path)) | 151 (desc, path)) |
152 { | 152 { |
153 Lisp_Object path_entry, submenu_desc, submenu; | 153 Lisp_Object path_entry, submenu_desc, submenu; |
154 struct gcpro gcpro1; | 154 struct gcpro gcpro1; |
186 goto descend; | 186 goto descend; |
187 } | 187 } |
188 } | 188 } |
189 /* Submenu not found */ | 189 /* Submenu not found */ |
190 RETURN_UNGCPRO (Qnil); | 190 RETURN_UNGCPRO (Qnil); |
191 | 191 |
192 descend: | 192 descend: |
193 /* Prepare for the next iteration */ | 193 /* Prepare for the next iteration */ |
194 gui_item_init (&gui_item); | 194 gui_item_init (&gui_item); |
195 } | 195 } |
196 | 196 |
286 MAYBE_FRAMEMETH (f, popup_menu, (menu_desc,event)); | 286 MAYBE_FRAMEMETH (f, popup_menu, (menu_desc,event)); |
287 return Qnil; | 287 return Qnil; |
288 } | 288 } |
289 | 289 |
290 DEFUN ("normalize-menu-item-name", Fnormalize_menu_item_name, 1, 2, 0, /* | 290 DEFUN ("normalize-menu-item-name", Fnormalize_menu_item_name, 1, 2, 0, /* |
291 Convert a menu item name string into normal form. Returns a new string. | 291 Convert a menu item name string into normal form, and return the new string. |
292 Menu item names should be converted to normal form before being compared. | 292 Menu item names should be converted to normal form before being compared. |
293 */ | 293 */ |
294 (name, buffer)) | 294 (name, buffer)) |
295 { | 295 { |
296 struct buffer *buf = decode_buffer (buffer, 0); | 296 struct buffer *buf = decode_buffer (buffer, 0); |