From 48ee2f672d8ec465d9358c0333509f7db6807274 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sat, 17 Nov 2007 22:26:18 +0000 Subject: [PATCH] homeS --- lib/hcoop.dtl | 4 ++++ src/plugins/hcoop.sml | 11 +++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/hcoop.dtl b/lib/hcoop.dtl index 755949d..3135462 100644 --- a/lib/hcoop.dtl +++ b/lib/hcoop.dtl @@ -6,6 +6,10 @@ extern type homedir_path; extern val home : homedir_path -> your_path; {{Shortcut to denote a subdirectory of your home directory}} +extern val homeS : no_spaces -> no_spaces; +{{Use this version when it doesn't matter if the output is a real filesystem + path.}} + val mailmanHcoop = mailmanWebHost "lists.hcoop.net"; {{Configure your domain to have its Mailman mailing lists served on the web at lists.hcoop.net.}} diff --git a/src/plugins/hcoop.sml b/src/plugins/hcoop.sml index b5f6b40..0441e3b 100644 --- a/src/plugins/hcoop.sml +++ b/src/plugins/hcoop.sml @@ -29,9 +29,12 @@ val _ = Env.type_one "homedir_path" (fn dir => Domain.yourPath (OS.Path.concat (Domain.homedir (), dir)) handle _ => false) -val () = Env.registerFunction ("home", - fn [(EString dir, _)] => (SOME (EString (OS.Path.concat (Domain.homedir (), dir)), dl) - handle _ => NONE) - | _ => NONE) +fun addHome name = Env.registerFunction (name, + fn [(EString dir, _)] => (SOME (EString (OS.Path.concat (Domain.homedir (), dir)), dl) + handle _ => NONE) + | _ => NONE) + +val () = addHome "home" +val () = addHome "homeS" end -- 2.20.1