SPUG: tidy in 3 flavors; Perl, HTML, JavaScript

Itay Furman itayf at u.washington.edu
Thu Oct 5 21:15:31 PDT 2006


On Thu, 5 Oct 2006, Bill Campbell wrote:

> Date: Thu, 5 Oct 2006 13:53:51 -0700
> From: Bill Campbell <bill at celestial.com>
> To: spug-list at pm.org
> Subject: Re: SPUG: tidy in 3 flavors; Perl, HTML, JavaScript
> 
> On Thu, Oct 05, 2006, Itay Furman wrote:
>>
>>
>> On Thu, 5 Oct 2006, Michael R. Wolf wrote:
>>
>>> When _I_ *write* code, I use emacs' built-in cperl-mode, html-mode, and
>>> java-mode.   I'm mostly happy with them -- they're right there under my
>>> finger tips, and they happen automagically.
>>>
>>> But this is a *rewrite* (or reformat) job, and I'm lazy (one of 3 virtues).
>>> I don't want to fat-finger all the code in emacs.
>>>
>>
>> In emacs: marking the whole buffer, or some region, and then
>> 	'M-x ident-region'
>> does save me a lot of work.  (After making sure I'm in
>> cperl-mode, or whatever appropriate mode.)
>> There might be some mode-specific functions but I don't remeber
>> for sure -- I always use the above.
>
> Cleaning up code like this may well cause more problems than it solves if
> one has to incorporate updates from a third party as it can render
> ``patch'' worthless.
>

True.  (I do this cleaning only when I "take over" the code.)
The problem, though, comes out from _cleaning up the code_ 
regardless of the tool used for that.

> IHMO Stallman standards and emacs tends to create C code that look OK in
> emacs, but is incomprehensible with a sensible editor like vi :-).
>
> Bill

As far as I remember the major programming modes allow you to 
choose between few code layout styles; I think I avoided the
default.

 	Itay

-- 
Itay Furman
   phone	: +972 (0)2 648 1940
   email	: itayf at fastmail.fm



More information about the spug-list mailing list