diff options
author | Dai Sato <satodai@w3m.jp> | 2006-04-05 14:18:53 +0000 |
---|---|---|
committer | Dai Sato <satodai@w3m.jp> | 2006-04-05 14:18:53 +0000 |
commit | bc7f9c90263523dc9c19c63c520cbc8f46c3cbdb (patch) | |
tree | e7632ff276fbfed9e41e487bad1375f46c1f4fa7 /menu.c | |
parent | replace pclose passed to localcgi_post/get() with fclose in openURL() (diff) | |
download | w3m-bc7f9c90263523dc9c19c63c520cbc8f46c3cbdb.tar.gz w3m-bc7f9c90263523dc9c19c63c520cbc8f46c3cbdb.zip |
apply multiple patches on w3m-dev(-en) ML since Jun 2005 to Jan 2006.
Diffstat (limited to '')
-rw-r--r-- | menu.c | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $Id: menu.c,v 1.43 2004/08/02 15:40:50 ukai Exp $ */ +/* $Id: menu.c,v 1.44 2006/04/05 14:18:54 inu Exp $ */ /* * w3m menu.c */ @@ -590,7 +590,6 @@ action_menu(Menu *menu) *item.variable = item.value; if (item.type & MENU_FUNC) { CurrentKey = -1; - CurrentKeyData = NULL; CurrentCmdData = item.data; (*item.func) (); CurrentCmdData = NULL; @@ -1738,6 +1737,23 @@ initMenu(void) } } +DEFUN(interpretAsMenu, INTERPRET_AS_MENU, "Interpret current document as menu-definition") +{ + FILE *mf; + MenuList *list; + + if ((mf = fopen(Currentbuf->sourcefile, "r")) != NULL) { + interpret_menu(mf); + fclose(mf); + + for (list = w3mMenuList; list->id != NULL; list++) { + if (list->item == NULL) + continue; + new_menu(list->menu, list->item); + } + } +} + int setMenuItem(MenuItem *item, char *type, char *line) { |