On 03/21/2014 11:13 AM, Eric Blake wrote:
as did completely removing my custom mode and instead relying on
.dir-locals.el. c-special-indent-hook won't work in .dir-locals.el,
More to the point, I recommend including this when you respin the patch:
diff --git i/docs/hacking.html.in w/docs/hacking.html.in
index 0febee2..61eebf5 100644
--- i/docs/hacking.html.in
+++ w/docs/hacking.html.in
@@ -274,25 +274,9 @@
indentation level, and other than that, follow the K&R style.
</p>
<p>
- If you use Emacs, add the following to one of one of your
start-up files
- (e.g., ~/.emacs), to help ensure that you get indentation right:
- </p>
-<pre>
- ;;; When editing C sources in libvirt, use this style.
- (defun libvirt-c-mode ()
- "C mode with adjusted defaults for use with libvirt."
- (interactive)
- (c-set-style "K&R")
- (setq indent-tabs-mode nil) ; indent using spaces, not TABs
- (setq c-indent-level 4)
- (setq c-basic-offset 4))
- (add-hook 'c-mode-hook
- '(lambda () (if (string-match "/libvirt" (buffer-file-name))
- (libvirt-c-mode))))
-</pre>
-
- <p>
- If you use vim, append the following to your ~/.vimrc file:
+ If you use Emacs, the project includes a file .dir-locals.el
+ that sets up the preferred indentation. If you use vim, append
+ the following to your ~/.vimrc file:
</p>
<pre>
set nocompatible
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org