'Indent' for Oz Programs?

Tan Woon Kiong twoonkio at dso.org.sg
Fri Aug 2 08:37:23 CEST 2002


Wonderful, works nicely. Thankyou so much for providing help with the elisp
code and shell code as well.

Thanks Denys, thanks Leif.

Denys Duchier wrote:

> twoonkio at dso.org.sg (Tan Woon Kiong) writes:
>
> > I am looking for an indentation utility that indents Oz programs (much
> > like the 'Indent' program for C). Is there such a utility?
>
> You can use emacs to reindent your program for you using
> M-x oz-indent-buffer.  This can be done with a script.
>
> For example, start with a script like this:
>
> #! /bin/sh
> echo "Formatting $1"
> emacs --load=ozindent.el --eval="(ozindent \"$1\")" --kill --batch
>
> and create the auxiliary elisp file ozindent.el containing the
> following code:
>
> (setq load-path (cons "/usr/local/oz/share/elisp" load-path))
> (require 'oz)
> (defun ozindent (file)
>   (find-file file)
>   (oz-mode)
>   (oz-indent-buffer)
>   (save-buffer)
>   (kill-emacs))
>
> That works fine, as long as the code to indent already has useful line
> breaks.
>
> Cheers,
>
> --
> Dr. Denys Duchier                       Denys.Duchier at ps.uni-sb.de
> Forschungsbereich Programmiersysteme    (Programming Systems Lab)
> Universitaet des Saarlandes, Geb. 45    http://www.ps.uni-sb.de/~duchier
> Postfach 15 11 50                       Phone: +49 681 302 5618
> 66041 Saarbruecken, Germany             Fax:   +49 681 302 5615
>
> -
> Please send submissions to users at mozart-oz.org
> and administriva mail to users-request at mozart-oz.org.
> The Mozart Oz web site is at http://www.mozart-oz.org/.

-
Please send submissions to users at mozart-oz.org
and administriva mail to users-request at mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.





More information about the mozart-users mailing list