Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "Matias Giovannini" <mgiovann@script.org.ar>
To: "Bruno Petazzoni" <Bruno.Petazzoni@ac-idf.jussieu.fr>,
	caml-list@pauillac.inria.fr
Subject: RE: caml/mac + alpha
Date: 21 Oct 1996 11:41:57 -0300	[thread overview]
Message-ID: <n1366223177.25655@hulley.ad.net.ar> (raw)

[-- Attachment #1: Message Body --]
[-- Type: text/plain, Size: 2207 bytes --]


> quelqu'un a-t-il interface' caml-light/mac avec l'e'diteur alpha ? je n'ai
> pas le courage de plonger dans TCL pour faire le travail... et je suis
> certain que quelqu'un l'a de'ja` fait bien mieux que je serais capable de
> le faire...

I've written a (sort of) Caml mode definition for Alpha. It's kind of useable, though.
I hadn't the time to test the marking procedure. If somebody likes to build upon this mode, feel free to do so.

###############################################################################
if {$startingUp} {
	addMode Caml dummyCaml {*.ml *.mli} {}
	return
}


newModeVar Caml leftFillColumn {4} 0
newModeVar Caml electricSemi {1} 1
newModeVar Caml wordBreak {\w+} 0
newModeVar Caml wordWrap {0} 1
newModeVar Caml funcExpr {^let(\s+rec)?(\s+prefix)?\s+\S+(\s+\w+)*\s*=} 0
newModeVar Caml wordBreakPreface {\W} 0
newModeVar Caml electricTab {1} 1
newModeVar Caml autoMark	0	1

set CamlCommentRegexp	{/\(\*([^\*]|\*[^)])*\*\)/}
set CamlPreRegexp		{^\#\s*\w+}
set CamlKeyWords		{
	and    as     begin       do      done      downto
	else   end    exception   for     fun       function
	if     in     let         match   mutable   not
	of     or     prefix      rec     then      to
	try    type   value       where   while     with
	ref
}
regModeKeywords -b {(*} {*)} -c red -k blue -s green Caml $CamlKeyWords
unset CamlKeyWords


#================================================================================

proc dummyCaml {} {}

proc CamlMarkFile {} {
 	global CamlModeVars
 	set pos 0
 	while {![catch {search -s -f 1 -r 1 -m 0 -i 0 $CamlModeVars(funcExpr) $pos} res]} {
 		set start [lindex $res 0]
 		set end [expr [lindex $res 1] + 1]
 		set text [getText $start $end]
 		if {[regexp {let(\s+rec)?(\s+prefix)?\s+(\S+)} $text entire isrec ispref fname]} {
 			set tmp [expr $start + [string first $fname $text]]
 			set inds($fname) "$tmp [expr $tmp + [string length $fname]]"
 		}
 		set pos $end
 	}
 	if {[info exists inds]} {
 		foreach f [lsort -ignore [array names inds]] {
 			set res $inds($f)
 			setNamedMark $f [lineStart [lindex $res 0]] [lindex $res 0] [lindex $res 1]
 		}
 	}
}






             reply	other threads:[~1996-10-22 14:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-10-21 14:41 Matias Giovannini [this message]
  -- strict thread matches above, loose matches on Subject: below --
1996-10-23 12:12 Claudio Russo
1996-10-17 19:33 Bruno Petazzoni

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=n1366223177.25655@hulley.ad.net.ar \
    --to=mgiovann@script.org.ar \
    --cc=Bruno.Petazzoni@ac-idf.jussieu.fr \
    --cc=caml-list@pauillac.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