From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Timur Aydin Newsgroups: gmane.emacs.help Subject: formatting function argument list Date: Sun, 25 May 2003 23:47:57 +0300 Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1053895858 30467 80.91.224.249 (25 May 2003 20:50:58 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 25 May 2003 20:50:58 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Sun May 25 22:50:54 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19K2Ri-0007s4-00 for ; Sun, 25 May 2003 22:50:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19K2Ru-00016F-Ho for gnu-help-gnu-emacs@m.gmane.org; Sun, 25 May 2003 16:50:34 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!newsfeed2.earthlink.net!newsfeed.earthlink.net!wn14feed!worldnet.att.net!216.166.71.14!border3.nntp.aus1.giganews.com!nntp.giganews.com!nntp3.aus1.giganews.com!news.giganews.com.POSTED!not-for-mail Original-NNTP-Posting-Date: Sun, 25 May 2003 15:48:20 -0500 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:L477qMT1dBUWjdyfIP2wlA3iyNQ= Original-Lines: 54 Original-X-Trace: sv3-5bidUzRlem6azuRlLSAep+XdpFaoHwjRmgHfQejzFTTtFBG3BZtzKvIR9TlF579fZfEZsmoe2jgDBKe!qodTQ0M5ziQtpiWtDaS5gBfxXw9oO9avzzie91Hin27AOG2ZS4B16Q== Original-X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Original-Xref: shelby.stanford.edu gnu.emacs.help:113675 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:10171 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:10171 Hi, There are many functions in our C/C++ source tree which have their argument lists messed up in terms of formatting/alignment. Part of the problem is that both tabs and spaces have been used. For example: int func( int a, int b, size_t c) { /* Function body (currently fubar in terms of indentation) */ } After marking the whole function and doing C-M-\, here is what I get: int func(int a, char b, size_t c) { /* Function body (nicely indented) */ } The function body is formatted appropriately and all tabs are gone. But the whitespace in the function argument list still needs to be dealt with. Any suggestions on how to format it? Here are some examples that I can think of: /* All arguments in one line, one space between type and argument */ int func(int a, char b, size_t c) { /* Function body (nicely indented) */ } /* One argument per line, one space between type and argument */ int func(int a, char b, size_t c) { /* Function body (nicely indented) */ } /* One argument per line, arguments aligned. */ int func(int a, char b, size_t c) { /* Function body (nicely indented) */ } -- Timur Aydin