summaryrefslogtreecommitdiff
path: root/src/elisp
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-11-01 10:47:10 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-11-01 10:47:10 -0400
commit89f97891a33b5c0a8971d3508059a139a8815091 (patch)
treea11a164b5f4671f27a3e77a5346b4e981e35b801 /src/elisp
parent389aae9254a3bdee3e79bb75b7355de270f2e8dd (diff)
Parsing 'let'
Diffstat (limited to 'src/elisp')
-rw-r--r--src/elisp/urweb-defs.el23
-rw-r--r--src/elisp/urweb-mode.el2
2 files changed, 13 insertions, 12 deletions
diff --git a/src/elisp/urweb-defs.el b/src/elisp/urweb-defs.el
index 8b4ebe2e..fe4da2e4 100644
--- a/src/elisp/urweb-defs.el
+++ b/src/elisp/urweb-defs.el
@@ -91,7 +91,7 @@ notion of \"the end of an outline\".")
(defconst urweb-begin-syms
- '("struct" "sig")
+ '("let" "struct" "sig")
"Symbols matching the `end' symbol.")
(defconst urweb-begin-syms-re
@@ -103,12 +103,12 @@ notion of \"the end of an outline\".")
;; "Symbols matching (loosely) the `end' symbol.")
(defconst urweb-sexp-head-symbols-re
- (urweb-syms-re "struct" "sig" "with"
- "if" "then" "else" "case" "of" "fn" "fun" "val" "and"
- "datatype" "type" "open" "include"
- urweb-module-head-syms
- "con" "fold" "where" "extern" "constraint" "constraints"
- "table" "sequence" "class")
+ (urweb-syms-re "let" "struct" "sig" "in" "with"
+ "if" "then" "else" "case" "of" "fn" "fun" "val" "and"
+ "datatype" "type" "open" "include"
+ urweb-module-head-syms
+ "con" "fold" "where" "extern" "constraint" "constraints"
+ "table" "sequence" "class")
"Symbols starting an sexp.")
;; (defconst urweb-not-arg-start-re
@@ -133,11 +133,11 @@ notion of \"the end of an outline\".")
("if" "else" 0)
(,urweb-=-starter-syms nil)
(("case" "datatype" "if" "then" "else"
- "open" "sig" "struct" "type" "val"
+ "let" "open" "sig" "struct" "type" "val"
"con" "constraint" "table" "sequence" "class")))))
(defconst urweb-starters-indent-after
- (urweb-syms-re "struct" "sig")
+ (urweb-syms-re "let" "in" "struct" "sig")
"Indent after these.")
(defconst urweb-delegate
@@ -164,11 +164,12 @@ for all symbols and in all lines starting with the given symbol."
(defconst urweb-open-paren
(urweb-preproc-alist
- `((,(list* urweb-begin-syms) ,urweb-begin-syms-re "\\<end\\>")))
+ `((,(list* "in" urweb-begin-syms) ,urweb-begin-syms-re "\\<end\\>")))
"Symbols that should behave somewhat like opening parens.")
(defconst urweb-close-paren
- `(("end" ,urweb-begin-syms-re)
+ `(("in" "\\<let\\>")
+ ("end" ,urweb-begin-syms-re)
("then" "\\<if\\>")
("else" "\\<if\\>" (urweb-bolp))
("of" "\\<case\\>")
diff --git a/src/elisp/urweb-mode.el b/src/elisp/urweb-mode.el
index 8c016e3d..1a578cf9 100644
--- a/src/elisp/urweb-mode.el
+++ b/src/elisp/urweb-mode.el
@@ -135,7 +135,7 @@ See doc for the variable `urweb-mode-info'."
(urweb-syms-re "and" "case" "class" "con" "constraint" "constraints"
"datatype" "else" "end" "extern" "fn" "fold"
"fun" "functor" "if" "include"
- "of" "open"
+ "of" "open" "let" "in"
"rec" "sequence" "sig" "signature"
"struct" "structure" "table" "then" "type" "val" "where"
"with"