#!/usr/bin/install-menu

!include menu.h
compat="menu-2";
outputencoding="UTF-8";
outputlanguage="C";

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

function label($arg)=tolower(replacewith($arg,"/ ","--"));
function q($arg)=esc($arg,"\"\\");

supported;
	x11="	  (,(_ \"" q(title()) "\") (system \"exec " q($command) " &\"))" ifneq(entryindex(), sub(entrycount(), "1"), "\n");
	text="	  (,(_ \"" q(title()) "\") (system \"exec " q(term()) " &\"))" ifneq(entryindex(), sub(entrycount(), "1"), "\n");
	wm="	  (,(_ \"" q(title()) "\") (progn (setq saved-command-line-args '(\"" q($command) "\")) (restart)))" ifneq(entryindex(), sub(entrycount(), "1"), "\n");
endsupported;

preoutput=";; This is -*-Lisp-*-\n;; Automagically generated file.  Do not edit (see /usr/doc/menu/html/index.html)\n\n(provide 'altlinux-menu)\n\n";

startmenu="(defvar " label($section)"-menu\n	`(\n";
endmenu="))\n";
submenutitle="	  (,(_ \"" q(title()) "\") . " label($section) "-menu)" ifneq(entryindex(), sub(entrycount(), "1"), "\n");
sort=title()
