#!/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 "\" (system \"" $command " &\"))" ifneq(entryindex(), sub(entrycount(), "1"), "\n");

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

  wm="           '(\"" $title "\"(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="(defun " tolower(replacewith($section, "/", "-")) "-menu ()\n        (list \n";
endmenu="))\n";
submenutitle="           '(\"" $title "\" . " tolower(replacewith($section, "/", "-")) "-menu)" ifneq(entryindex(), sub(entrycount(), "1"), "\n");

