[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: M-x indent-region

From: Sanford Selznick
Subject: Re: M-x indent-region
Date: Tue, 06 May 2003 20:47:37 -0700
User-agent: MT-NewsWatcher/3.3b1 (PPC Mac OS X)

In article <address@hidden>,
 address@hidden (Kai Grossjohann) wrote:
> Yeah.  Maybe it helps to set a really long max line length, and to
> tell it to honor existing newlines.
> But so far I've still only read the documentation, not tested it.
> It's not important enough for me...

Obviously.  ;-)

Here's how the final version ended up...

emacs -batch -eval '(find-file "~/test")' -eval '(c-mode)' -eval 
'(indent-region (point-min) (point-max) nil)' -eval '(save-buffer)' 
-eval '(kill-buffer (current-buffer))'

Where '~/test' is the file that will be wrapped in place, keeping all 
tokens on the line they started on.  Note the '(c-mode)' in case the 
file doesn't end in a c-program extension.  And note the third argument 
on indent-region, which I'm not entirely sure is necessary or not.  But 
it's working fine.

Thanks again for your help.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]