From 6b71895409837ee7ebea2a66f62d98dbee8b97e7 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sun, 11 Nov 2007 22:37:40 +0000 Subject: [PATCH] domtool-mode standard library table changes performed automatically by Makefile --- Makefile | 5 ++++- elisp/.cvsignore | 1 + elisp/domtool-mode.el | 19 +------------------ elisp/domtool-tables.el | 20 ++++++++++++++++++++ lib/easy_domain.dtl | 13 ++++++++++--- 5 files changed, 36 insertions(+), 22 deletions(-) create mode 100644 elisp/.cvsignore create mode 100644 elisp/domtool-tables.el diff --git a/Makefile b/Makefile index bd47694..e179273 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -all: mlton bin/vmailpasswd +all: mlton bin/vmailpasswd elisp/domtool-tables.el bin/vmailpasswd: src/mail/vmailpasswd.c $(CC) -lcrypt -o $@ $< @@ -149,6 +149,9 @@ bin/smtplog: $(COMMON_MLTON_DEPS) src/smtplog.mlb bin/mysql-fixperms: $(COMMON_MLTON_DEPS) src/mysql-fixperms.mlb $(MLTON) -output bin/mysql-fixperms src/mysql-fixperms.mlb +elisp/domtool-tables.el: lib/*.dtl bin/domtool-doc + bin/domtool-doc -basis -emacs >$@ + install: cp scripts/domtool-publish /usr/local/sbin/ cp scripts/domtool-reset-global /usr/local/sbin/ diff --git a/elisp/.cvsignore b/elisp/.cvsignore new file mode 100644 index 0000000..db5af89 --- /dev/null +++ b/elisp/.cvsignore @@ -0,0 +1 @@ +domtool-tables.el diff --git a/elisp/domtool-mode.el b/elisp/domtool-mode.el index c05fabd..4b23e76 100644 --- a/elisp/domtool-mode.el +++ b/elisp/domtool-mode.el @@ -39,25 +39,8 @@ (defun domtool-syms-re (&rest syms) (concat "\\<" (regexp-opt syms t) "\\>")) -(defconst domtool-types-regexp - (domtool-syms-re "proxy_target" "proxy_port" "mod_rewrite_cond_flag" "mod_rewrite_flag" "rewrite_arg" "redirect_code" "autoindex_option" "autoindex_width" "homedir_path" "dnsRecord" "apache_option" "authType" "location" "ssl" "ssl_cert_path" "suexec_flag" "web_node" "aliasTarget" "aliasSource" "email" "emailUser" "mail_node" "dnsKind" "master" "dns_node" "soa" "serial" "your_path" "your_group" "your_user" "group" "user" "node" "your_domain_host" "your_domain" "domain" "host" "ip" "no_newlines" "no_spaces" "bool" "string" "int") - "A regexp that matches Domtool types from the standard library.") -(defconst domtool-contexts-regexp - (domtool-syms-re "Location" "Vhost" "Domain") - "A regexp that matches Domtool contexts from the standard library.") - -(defconst domtool-actions-regexp - (domtool-syms-re "errorDocument" "scriptAlias" "alias" "proxyPassReverse" "proxyPass" "rewriteLogLevel" "localProxyRewrite" "rewriteBase" "rewriteCond" "rewriteRule" "setEnv" "davFilesystem" "readmeName" "headerName" "unset_indexOptions" "set_indexOptions" "indexOptions" "addDescription" "mailmanWebHost" "dnsDefault" "dnsAlias" "dnsMail" "dnsIP" "nameserver" "dom" "web" "webAt" "relayMail" "handleMail" "dns" "addDefaultCharset" "action" "forceTypeOff" "forceType" "directoryIndex" "unset_options" "set_options" "options" "satisfyAny" "satisfyAll" "denyFrom" "denyFromAll" "allowFrom" "allowFromAll" "orderDenyAllow" "orderAllowDeny" "requireGroup" "requireUser" "requireValidUser" "authUserFile" "authName" "authType" "serverAliasDefault" "serverAlias" "serverAliasHost" "directory" "location" "vhost" "defaultAlias" "aliasDrop" "aliasMulti" "emailAlias" "aliasPrim" "domain") - "A regexp that matches Domtool actions from the standard library.") - -(defconst domtool-vals-regexp - (domtool-syms-re "ornext" "cond_nocase" "env" "skip" "redirectWith" "mimeType" "passthrough" "noescape" "qsappend" "nocase" "nosubreq" "chain" "last" "gone" "forbidden" "redirect" "redir307" "redir305" "redir304" "redir303" "redir302" "redir301" "redir300" "seeother" "permanent" "temp" "xhtml" "versionSort" "trackModified" "suppressSize" "suppressRules" "suppressLastModified" "suppressIcon" "suppressHtmlPreamble" "suppressDescription" "suppressColumnSorting" "scanHtmlTitles" "nameWidth" "ignoreClient" "ignoreCase" "iconWidth" "iconHeight" "iconsAreLinks" "htmlTable" "foldersFirst" "fancyIndexing" "descriptionWidth" "characters" "autofit" "home" "web_node" "default_node" "dnsDefaultA" "dnsNS" "dnsMX" "dnsCNAME" "dnsA" "indexes" "includesNOEXEC" "execCGI" "kerberos" "digest" "basic" "use_cert" "no_ssl" "web_node_to_node" "dropTarget" "addressesTarget" "addressTarget" "catchAllSource" "defaultSource" "userSource" "mail_node_to_node" "noDns" "useDns" "internalMaster" "externalMaster" "dns_node_to_node" "defaultSoa" "soa" "serialConst" "serialAuto" "ip_of_node" "true" "false") - "A regexp that matches Domtool vals from the standard library.") - -(defconst domtool-env-vars-regexp - (domtool-syms-re "Aliases" "DNS" "DocumentRoot" "Group" "MailNodes" "Mailbox" "SSL" "ServerAdmin" "SuExec" "TTL" "User" "WWW" "WebNodes") - "A regexp that matches Domtool env-vars from the standard library.") +(load-file "/usr/local/share/emacs/site-lisp/domtool-mode/domtool-tables.el") (defvar domtool-font-lock-keywords `(,(concat diff --git a/elisp/domtool-tables.el b/elisp/domtool-tables.el new file mode 100644 index 0000000..38acedd --- /dev/null +++ b/elisp/domtool-tables.el @@ -0,0 +1,20 @@ +(defconst domtool-types-regexp + (domtool-syms-re "proxy_target" "proxy_port" "mod_rewrite_cond_flag" "mod_rewrite_flag" "rewrite_arg" "redirect_code" "autoindex_option" "autoindex_width" "homedir_path" "dnsRecord" "apache_option" "authType" "location" "ssl" "ssl_cert_path" "suexec_flag" "web_node" "aliasTarget" "aliasSource" "email" "emailUser" "mail_node" "dnsKind" "master" "dns_node" "soa" "serial" "your_path" "your_group" "your_user" "group" "user" "node" "your_domain_host" "your_domain" "domain" "host" "ip" "no_newlines" "no_spaces" "bool" "string" "int") + "A regexp that matches Domtool types from the standard library.") + +(defconst domtool-contexts-regexp + (domtool-syms-re "Location" "Vhost" "Domain") + "A regexp that matches Domtool contexts from the standard library.") + +(defconst domtool-actions-regexp + (domtool-syms-re "errorDocument" "scriptAlias" "alias" "proxyPassReverse" "proxyPass" "rewriteLogLevel" "localProxyRewrite" "rewriteBase" "rewriteCond" "rewriteRule" "setEnv" "davFilesystem" "readmeName" "headerName" "unset_indexOptions" "set_indexOptions" "indexOptions" "addDescription" "mailmanWebHost" "dnsDefault" "dnsAlias" "dnsMail" "dnsIP" "nameserver" "dom" "domNoDefaultAlias" "web" "webAt" "relayMail" "handleMail" "dns" "addDefaultCharset" "action" "forceTypeOff" "forceType" "directoryIndex" "unset_options" "set_options" "options" "satisfyAny" "satisfyAll" "denyFrom" "denyFromAll" "allowFrom" "allowFromAll" "orderDenyAllow" "orderAllowDeny" "requireGroup" "requireUser" "requireValidUser" "authUserFile" "authName" "authType" "serverAliasDefault" "serverAlias" "serverAliasHost" "directory" "location" "vhost" "defaultAlias" "aliasDrop" "aliasMulti" "emailAlias" "aliasPrim" "domain") + "A regexp that matches Domtool actions from the standard library.") + +(defconst domtool-vals-regexp + (domtool-syms-re "ornext" "cond_nocase" "env" "skip" "redirectWith" "mimeType" "passthrough" "noescape" "qsappend" "nocase" "nosubreq" "chain" "last" "gone" "forbidden" "redirect" "redir307" "redir305" "redir304" "redir303" "redir302" "redir301" "redir300" "seeother" "permanent" "temp" "xhtml" "versionSort" "trackModified" "suppressSize" "suppressRules" "suppressLastModified" "suppressIcon" "suppressHtmlPreamble" "suppressDescription" "suppressColumnSorting" "scanHtmlTitles" "nameWidth" "ignoreClient" "ignoreCase" "iconWidth" "iconHeight" "iconsAreLinks" "htmlTable" "foldersFirst" "fancyIndexing" "descriptionWidth" "characters" "autofit" "home" "web_node" "default_node" "dnsDefaultA" "dnsNS" "dnsMX" "dnsCNAME" "dnsA" "indexes" "includesNOEXEC" "execCGI" "kerberos" "digest" "basic" "use_cert" "no_ssl" "web_node_to_node" "dropTarget" "addressesTarget" "addressTarget" "catchAllSource" "defaultSource" "userSource" "mail_node_to_node" "noDns" "useDns" "internalMaster" "externalMaster" "dns_node_to_node" "defaultSoa" "soa" "serialConst" "serialAuto" "ip_of_node" "true" "false") + "A regexp that matches Domtool vals from the standard library.") + +(defconst domtool-env-vars-regexp + (domtool-syms-re "Aliases" "DNS" "DocumentRoot" "Group" "MailNodes" "Mailbox" "SSL" "ServerAdmin" "SuExec" "TTL" "User" "WWW" "WebNodes") + "A regexp that matches Domtool env-vars from the standard library.") + diff --git a/lib/easy_domain.dtl b/lib/easy_domain.dtl index 7ed29a4..aef0232 100644 --- a/lib/easy_domain.dtl +++ b/lib/easy_domain.dtl @@ -17,7 +17,7 @@ val webAt = val web = webAt web_node; -val dom = +val domNoDefaultAlias = \ d : (your_domain) -> \\ config : Domain -> domain d with @@ -28,8 +28,6 @@ val dom = handleMail; dns (dnsMX 1 "deleuze.hcoop.net"); - mailbox <- Mailbox; - defaultAlias mailbox; web "www" with serverAliasDefault; @@ -40,6 +38,15 @@ val dom = config end; +val dom = + \ d : (your_domain) -> + \\ config : Domain -> + domNoDefaultAlias d with + config; + mailbox <- Mailbox; + defaultAlias mailbox; + end; + val nameserver = \host -> dns (dnsNS host); val dnsIP = \from -> \to -> dns (dnsA from to); val dnsMail = \num -> \host -> dns (dnsMX num host); -- 2.20.1