I am working on a project where some people use vi, some use emacs and some others (including gedit). The most simple yet global way (although not perfect) to enforce (at least visual) style was to add the following lines to the end of each file:
... return 0; } // Editor modelines - generated by http://www.wireshark.org/tools/modelines.html // Local variables: // c-basic-offset: 4 // tab-width: 4 // indent-tabs-mode: t // truncate-lines: 1 // End: // vim:set ft=cpp ts=4 sw=4 sts=4 nowrap: cindent:
the question is: how can I convert the emacs portion in a "one-line" code (as vim can)? and yet keep it at the end of the source file (not at the top).
(Probably this can be recasted as Lisp question but I am not familiar with it)