[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using indent program as filter to automatically view read-only C fil
From: |
Harry Putnam |
Subject: |
Re: Using indent program as filter to automatically view read-only C files |
Date: |
Fri, 03 Feb 2006 17:10:15 -0600 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
> Take a look at format.el, it has a machinery to filter a file through
> a program when Emacs visits the file. That machinery was invented for
> a different purpose, but perhaps it is general enough to serve yours.
>
> Btw, Emacs itself can reindent, so one easy way og doing what you want
> is to copy the contents of the file into another buffer, set its major
> mode to C, and then reindent there. If the buffer has no file name,
> you don't risk to overwrite the original files.
This may be a little off the wall but after looking at format.el I
could not tell if it can do something like format a log file when emacs
opens one. Something like just formating each line to column 72 or
such.