The emacs settings suggested in
don't follow the indentation guidelines.
"For indentation use space; do not use the tab (\t) character."
however: the elisp code explicitly sets tabs, and tab width.
Here's a new suggestion from me.
I think we should add this as mysql-style.el somewhere in the source tree:
(c-basic-offset . 2)
(c-comment-only-line-offset . 0)
(c-offsets-alist . ((statement-block-intro . +)
(knr-argdecl-intro . 0)
(substatement-open . 0)
(label . -)
(statement-cont . +)
(arglist-close . c-lineup-arglist)
(innamespace . 0)
(inline-open . 0)
(defun mysql-c-mode-hook ()
(setq indent-tabs-mode nil)
(setq comment-column 48))
(add-hook 'c-mode-common-hook 'mysql-c-mode-hook)
Note that I have added (inline-open . 0) which seems to be the current
Note that I have also added (innamespace . 0), that's a new suggestion
I also use add-hook rather than setq in case the user has his own hooks.
I removed the font-lock stuff, since that is really a user preference,
and can be quite a nuisance for people who have problems seeing colors.
As usual: comments are welcome.