]> git.decadent.org.uk Git - ion3.git/blobdiff - mod_menu/mod_menu.lua
[svn-upgrade] Integrating new upstream version, ion3 (20070506)
[ion3.git] / mod_menu / mod_menu.lua
index 913ad1618673adc04d6671e86d3581249afed9da..368115bcfd16f9f13c2d910470230abe9e4ae356 100644 (file)
@@ -3,10 +3,7 @@
 -- 
 -- Copyright (c) Tuomo Valkonen 2004-2007.
 --
--- Ion is free software; you can redistribute it and/or modify it under
--- the terms of the GNU Lesser General Public License as published by
--- the Free Software Foundation; either version 2.1 of the License, or
--- (at your option) any later version.
+-- See the included file LICENSE for details.
 --
 
 -- This is a slight abuse of the package.loaded variable perhaps, but
@@ -37,7 +34,7 @@ local function menu_(reg, sub, menu_or_name, fn, check)
         end
     end
 
-    menu=menudb.evalmenu(menu_or_name, {reg, sub})
+    menu=menudb.evalmenu(menu_or_name, reg, sub)
     
     return fn(reg, function(e) e.func(reg, sub) end, menu)
 end
@@ -57,17 +54,15 @@ end
 -- to use a bigger style by setting the field \var{big} to \code{true}.
 function mod_menu.menu(mplex, sub, menu_or_name, param) 
    local function menu_stdmenu(m, s, menu)
-      return mod_menu.do_menu(m, s, menu, param)
+        return ioncore.unsqueeze(mod_menu.do_menu(m, s, menu, param))
    end
    return menu_(mplex, sub, menu_or_name, menu_stdmenu, true)
 end
 
 -- Compatibility
 function mod_menu.bigmenu(mplex, sub, menu_or_name, initial) 
-    local function menu_bigmenu(m, s, menu)
-      return mod_menu.do_menu(m, s, menu, {big=true, initial=initial})
-    end
-    return menu_(mplex, sub, menu_or_name, menu_bigmenu, true)
+    local param={big=true, initial=initial}
+    return mod_menu.menu(mplex, sub, menu_or_name, param)
 end
 
 --DOC