#!/usr/sbin/install-menu

compat="menu-1";

!include menu.h

compat="menu-2";

userprefix=".sawfish/lisp";
rootprefix="/etc/X11/sawfish";
genmenu="mandrake-menu.jl";
rootsection="Mandrake";

supported;
  x11="           '(\"" $title "\" (system \"" esc ($command, "\"") " &\"))" ifneq(entryindex(), sub(entrycount(), "1"), "\n");

  text="           '(\"" $title "\" (system \"" esc(term(), "\"") " &\"))" ifneq(entryindex(), sub(entrycount(), "1"), "\n");

  wm="           '(\"" $title "\"(progn (setq saved-command-line-args '(\""$command"\")) (restart)))" ifneq(entryindex(), sub(entrycount(), "1"), "\n");
endsupported;

preoutput=";; This is -*-Lisp-*-\n;; Automagically generated file.  Do not edit.\n\n(provide 'mandrake-menu)\n\n";

startmenu="(defvar " tolower(replacewith($section, "/ ", "--")) "-menu \n        (list \n";
endmenu="))\n";
submenutitle="           '(\"" $title "\" . " tolower(replacewith($section, "/ ", "--")) "-menu)" ifneq(entryindex(), sub(entrycount(), "1"), "\n");

