Song Lining wrote:
> I want to know if there's a auto-indent tool that can streamline C files
> which are already in a mess.
> I know emacs can do something like this when using it to write C code,
> but the files I want to manipulate is outputted by some other editors.
(X)Emacs can reindent C code: load the file (C-x C-f), mark the entire
file (C-x h), indent the region (C-M-\), then save it (C-x C-s).
You could automate the procedure with e.g.
(defun indent-file (filename)
(interactive "fFilename: ")
(find-file filename)
(indent-region (point-min) (point-max) nil)
(save-buffer)
(kill-buffer (current-buffer)))
--
Glynn Clements <[EMAIL PROTECTED]>