#!/usr/sbin/install-menu

compat="menu-1";

!include menu.h

compat="menu-2";

userprefix=".sawmill/lisp";
rootprefix="/etc/X11/sawmill";
genmenu="debian-menu.jl";
rootsection="Debian";

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

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

  wm="           (\"" $title "\"(lambda () (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 (see /usr/doc/menu/html/index.html)\n\n(provide 'debian-menu)\n\n";

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

