# HG changeset patch
# User Adam Chlipala
Increment
diff -r e3944a8a128a -r 4359e185d3af demo/prose
--- a/demo/prose Thu Sep 30 18:12:04 2010 -0400
+++ b/demo/prose Thu Sep 30 18:29:59 2010 -0400
@@ -5,7 +5,7 @@
./configure
make
sudo make install
-urweb -demo /Demo demo
The -demo /Demo flag says that we want to build a demo application that expects its URIs to begin with /Demo. The final argument demo gives the path to a directory housing demo files. One of the files in that directory is prose, a file describing the different demo pieces with HTML. Some lines of prose have the form foo.urp, naming particular project files (with the extension .urp) in that directory.
diff -r e3944a8a128a -r 4359e185d3af src/demo.sig --- a/src/demo.sig Thu Sep 30 18:12:04 2010 -0400 +++ b/src/demo.sig Thu Sep 30 18:29:59 2010 -0400 @@ -30,4 +30,6 @@ val make : {prefix : string, dirname : string, guided : bool} -> unit val make' : {prefix : string, dirname : string, guided : bool} -> bool + val noEmacs : bool ref + end diff -r e3944a8a128a -r 4359e185d3af src/demo.sml --- a/src/demo.sml Thu Sep 30 18:12:04 2010 -0400 +++ b/src/demo.sml Thu Sep 30 18:29:59 2010 -0400 @@ -27,6 +27,8 @@ structure Demo :> DEMO = struct +val noEmacs = ref false + fun make' {prefix, dirname, guided} = let val prose = OS.Path.joinDirFile {dir = dirname, @@ -333,6 +335,8 @@ else () end) + + val highlight = fn () => if !noEmacs then () else highlight () in if OS.Path.base file = "demo" then () diff -r e3944a8a128a -r 4359e185d3af src/main.mlton.sml --- a/src/main.mlton.sml Thu Sep 30 18:12:04 2010 -0400 +++ b/src/main.mlton.sml Thu Sep 30 18:29:59 2010 -0400 @@ -88,6 +88,9 @@ | "-moduleOf" :: fname :: _ => (print (Compiler.moduleOf fname ^ "\n"); OS.Process.exit OS.Process.success) + | "-noEmacs" :: rest => + (Demo.noEmacs := true; + doArgs rest) | arg :: rest => (if size arg > 0 andalso String.sub (arg, 0) = #"-" then raise Fail ("Unknown flag " ^ arg)