Source code formatter for SML

Source code formatter for SML

Post by Patrick Ph » Thu, 17 Jun 2004 01:06:46


Hi,

I have got a bunch of uncommented, badly formatted SML source files and
I need to do some housekeeping.

Any pointer to a source code formatter for SML?

Thanks in advance.

--
Patrick Philippot - Microsoft MVP [.Net]
MainSoft Consulting Services
www.mainsoft.fr
 
 
 

Source code formatter for SML

Post by Benjamin Y » Thu, 17 Jun 2004 05:26:44

On Tue, 15 Jun 2004 16:06:46 +0000 (UTC)



Have you tried the emacs sml-mode? It has been pretty good (but not
perfect) for me.

Benjamin

 
 
 

Source code formatter for SML

Post by Patrick Ph » Fri, 18 Jun 2004 00:45:21


Hi Benjamin,

The Emacs sml-mode helps when writing new code. However, my problem is
that I want to reformat existing files. I'm not an Emacs expert but I
don't think that the sml-mode in Emacs is able to reformat a block of
exisiting code. If I'm wrong (given my total ignorance about Emacs, this
might be the case), please explain. I would really appreciate.

By the way, I didn't mention that I'm working under Windows.

Thanks.

--
Patrick Philippot - Microsoft MVP [.Net]
MainSoft Consulting Services
www.mainsoft.fr
 
 
 

Source code formatter for SML

Post by Dave Benja » Fri, 18 Jun 2004 01:03:20


Just select a block and type:

M-x indent-region

On my machine, Ctrl-Alt-Backspace does the same thing.

Cheers,
Dave
 
 
 

Source code formatter for SML

Post by Hrvoje Bla » Fri, 18 Jun 2004 01:56:12


That's potentially *very* dangerous advice. Ctrl-Alt-Backspace kills X,
at least it used to -- and I don't care to test :-)

-- Hrvoje
 
 
 

Source code formatter for SML

Post by Dave Benja » Fri, 18 Jun 2004 05:22:36


Haha... sorry, that's backSLASH. ;)

--
.:[ dave benjamin: ramen/[sp00] -:- spoomusic.com -:- ramenfest.com ]:.
: i'm half drunk on babble you transmit - soul coughing / true dreams :
 
 
 

Source code formatter for SML

Post by Matthias B » Fri, 18 Jun 2004 05:22:42

Hrvoje Blazevic < XXXX@XXXXX.COM > writes:



He meant Ctrl-Alt-BackSLASH (C-M-\).

Matthias