From: Date: July 3 2009 8:18am Subject: Re: [style] [annc] Coding style update List-Archive: http://lists.mysql.com/internals/37075 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; CHARSET=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7BIT On Mon, 29 Jun 2009 09:53:13 +0200, Konstantin Osipov wrote: > Hello, > > On Friday, 2009-06-26, the group that governs MySQL server coding > style met for the first time, and considered two proposals: > > 1) Removing the switch alignment exception. > http://lists.mysql.com/internals/36385 > > 2) Specifying the function parameter names in declarations. > http://lists.mysql.com/internals/36404 > > Both proposals were accepted by the majority of votes (5 out of 6 > on both). > > You can find more details here: > > http://forge.mysql.com/wiki/Coding_Style > > This change will be effective once the Forge document is updated, > I will write a separate update on that. > > However, in order to do that, I need help: > > 1) Could someone using emacs send me the new formatting options > for emacs to take into account the new switch () style? > > I will try to handle the task for vim but won't mind a helping > hand here either. This seems to work, added only (statement-case-open . +) -- didrik (c-add-style "MY" '("K&R" (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-intro . c-lineup-arglist-intro-after-paren) (arglist-close . c-lineup-arglist) (innamespace . 0) (inline-open . 0) (statement-case-open . +) )) )) (defun mysql-c-mode-hook () (interactive) (require 'cc-mode) (c-set-style "MY") (setq indent-tabs-mode nil) (setq comment-column 48)) (add-hook 'c-mode-common-hook 'mysql-c-mode-hook) > > 2) The second proposal conflicts with some ctags usage patterns. > I will need to investigate whether it indeed confuses ctags, and > whether this can be avoided. >