On Thu, Apr 10, 2008 at 12:06:19PM +0200, Jim Meyering wrote:
> As for the emacs directives, I'm divided.
> On one hand, it's nice to record project-wide guidelines in a way
> that's hard to miss.  On the other, it's a shame to require this
> mark-up in every single .c and .h file.
> 
> While I was planning to add 7 lines to each of the remaining 24 files,
> consider this alternative:
> 
> Remove all such directives and instead instruct (via HACKING or some
> such file) developers to use a small .emacs snippet that defines the
> desired style for code in a libvirt/ subdir.  Then, the style would be
> defined in just one place, in case we ever change it.
> 
> For example, add this to your Emacs start-up file:
> 
> ;;; When editing C in libvirt, indent using spaces, not TABs.
> (add-hook 'c-mode-hook
>         '(lambda () (if (string-match "/libvirt/" (buffer-file-name))
>                         (setq indent-tabs-mode nil))))
> 
> and it has the same effect as inserting the following comment at the
> end of every file (assuming your working directory name matches):
> 
> /*
>  * Local variables:
>  *  indent-tabs-mode: nil
>  * End:
>  */

I was going to suggest exactly the above alternatives, so whichever
you think is best.

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to