[PATCH] emacs: whitespace-cleanup for emacs/*.el files
Tomi Ollila
tomi.ollila at iki.fi
Fri Jan 13 01:50:52 PST 2012
On Fri, 13 Jan 2012 08:22:49 +0000, David Edmondson <dme at dme.org> wrote:
> On Thu, 12 Jan 2012 23:07:03 +0100, Xavier Maillard <xavier at maillard.im> wrote:
> > On Wed, 11 Jan 2012 17:13:35 +0200, Tomi Ollila <tomi.ollila at iki.fi> wrote:
> > > Executed
> > > for f in emacs/*.el
> > > do emacs -q --batch --eval \
> > > "(progn (find-file \"$f\") (whitespace-cleanup) (save-buffer))"
> > > done
> > >
> > > which
> > > removed trailing whitespace and empty lines at the end of file
> > > removed spaces before tab (if any)
> > > converted 8 spaces to tabs in the beginning of line
> >
> > +1
> >
> > Maybe we should note something about this as a /coding style/ rule ?
>
> How about "Running `indent-region' over the file should produce no
> changes" as well?
So, In addition to 'uncrustify.cfg' we need emacs reformatter along lines:
(defun reformat-elisp-buffer ()
(interactice)
(emacs-lisp-mode)
(whitespace-cleanup)
(indent-region (point-min) (point-max)))
And this located in same directory as 'uncrustify.cfg', wherever
that ends up.
Tomi
More information about the notmuch
mailing list