From: "Denis Bueno" <dbueno@gmail.com>
To: "OCaml Mailing List" <caml-list@inria.fr>
Subject: Adding another "let ... in"-like construct for fontification/indentation
Date: Sat, 30 Jun 2007 10:57:49 -0600 [thread overview]
Message-ID: <6dbd4d000706300957q58f5a758s3e6b42f14ebdc114@mail.gmail.com> (raw)
All,
In tuareg-mode, is there a simple way to add support for indentation
for a new syntactic construct that behaves exactly like "let ... in
..."? I'd like "def ... in ..." to behave the same way. I'm thinking
of some code I can stuff in my .emacs, hopefuly, as opposed to a
modification of tuareg.el.
I'd like to be able to write:
let foo a b = a + b in
def hi(x) = print_int x; 0 in
let bar x = x in
<some body where foo and hi are in scope>
i.e. I'd like to interleave let .. in ... and def ... in ..., and have
them cooperate.
I looked around tuareg.el and found a bunch of places where "let" is
mentioned in a regexp, and even found `tuareg-make-find-kwop-regexp',
whose doc string says "Make a custom indentation regexp". That doc
string seems like it's what I want, but that function has no side
effects, so clearly it's not the whole story.
What I'm eventually shooting for is a tuareg mode that "knows" about
Jocaml syntax, since I'm fiddling around with that for the moment.
There are more new pieces of syntax on Jocaml (new keywords "spawn"
and "reply to") which seem pretty simple to support, but I haven't
thought about them very much.
Thanks in advance.
--
Denis
next reply other threads:[~2007-06-30 16:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-30 16:57 Denis Bueno [this message]
2007-07-01 11:22 ` Philippe Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6dbd4d000706300957q58f5a758s3e6b42f14ebdc114@mail.gmail.com \
--to=dbueno@gmail.com \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox