From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.devel Subject: Re: C style alist question? Date: Thu, 11 Apr 2019 17:00:47 +0200 Message-ID: <20190411150047.s6cs3ajq5h2cvxdj@Ergus> References: <20190406032636.7ftf2ua54uhy2k7e@Ergus> <837ec7bpe4.fsf@gnu.org> <20190411011659.zplon3n3lrtqmb2i@Ergus> <83v9zk4o6l.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="103664"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: NeoMutt/20180716 Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 11 17:03:54 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hEbF3-000QoV-Hi for ged-emacs-devel@m.gmane.org; Thu, 11 Apr 2019 17:03:53 +0200 Original-Received: from localhost ([127.0.0.1]:50325 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hEbF2-00040v-G9 for ged-emacs-devel@m.gmane.org; Thu, 11 Apr 2019 11:03:52 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:41475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hEbCr-0003HY-3z for emacs-devel@gnu.org; Thu, 11 Apr 2019 11:01:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hEbCo-0005Qh-Iz for emacs-devel@gnu.org; Thu, 11 Apr 2019 11:01:36 -0400 Original-Received: from sonic306-20.consmr.mail.ir2.yahoo.com ([77.238.176.206]:45831) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hEbCo-000567-4I for emacs-devel@gnu.org; Thu, 11 Apr 2019 11:01:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1554994854; bh=LDYtbY4qEc7vnX3Cavcr66engflclrBZKoopdJosEZE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=aAX51TnUDPA5yPeE5RpulsvULm+cIDUDWrqWcA5nKTVgRW43crNq9XTLh7OhKmjWM5QmFtpfDvWSWgvEXbgek0NzRTimed7M68PEXSSOGO2DMbHst7v/X18j2XOfTZoIVE3oraGdk9sEoYjNFjNutYchrABtgzY/grx5lCUAoOl0+gDN24ZsPy8LI1fMIjGOrhRRCVrFopybPgwYpk4I2ChUaC+pLMd7+VRFlSvOpiVo4O6yTQHeoVOsL5LOspVrBF1/pBZQrLEfCptfkqRAPCFwITo9afMUlu05LTnLA0vqa8Tela6W4M8NQ+3dU44gPd0a24QbjT9guAa4/GnIdw== X-YMail-OSG: gIQEWG0VM1mRw7Su0GYghSCT0x0yPuBMTBN8N4wAQQvAyxk6FSzcO2PcmdQY7HG t26Yb_z1tyB_nyN0zPBpMmuaEqAXXKz32A8bewqNMeutGKmbh3pYRH4jNOp9mneS6FNWu9vS9hNm WgACQEm7Ry6T7keLIzZr82igLRcb8E0v7V3Gw.fqn5IZrGv5RBxXbk2RYF6YzptaY7V4SgwErQXD RBclC3ZaiLUU0SUCWLvEOgUGmX257O_AGeFxqtc45sTsfCcNckvz5i4kuHzR63L7a6BaUAXC8zqW jjQuBiVz87C57IXlPKAHwACPbp12BSKROMpqyrmu0xn0qBSXc7Y4rkuUIBETQFSFG57JmxJTqbgm mxcxDrAeJPHg.JEBHNDkqq5ZCUovluRi32OvQFDTsYBwyMSAdjnKLGmQ_GRvIFYIsbqNaV7iFrlt VRfPxnLwDD7.OpQbXaC.THL.s.51IdgbLnRflp8.d.ks.ZkfmGv6vncapxHz9IhutHPxNx9LzIhU 1UCneRfoRYCDYxxJikSZC0otKlZ.qwNqK2IEFNVDihZmUNn41IH1tJT5Eo1RzNkHXDqrpFRuwc9W bx2L.K0.Tf0dXAa1XV9fvVFkH7_vea4zpcthJTh7s6VuySAmYcsD5XnLeMB0yfGqpNPNx272ym6u QRFwRQLBHobI4oo2vFEP6OR1quypixEBujuY_BsN1QFyOL_SaHssp8ttB.j081Yvyiq_hKdLyrDQ VkvSbFTvrsNGAz0TDdlY7RtVAK2PpooRINMFBSqRcKaffuLFcF4IaAaSlGg2pNj1C7.vR9EKNHI_ 3JjR4._iuclH6tm1ZZrINAX4sVcM0LzKR_j.5hnqcD Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ir2.yahoo.com with HTTP; Thu, 11 Apr 2019 15:00:54 +0000 Original-Received: from 84.88.50.33 (EHLO Ergus) ([84.88.50.33]) by smtp407.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 5e5e5a9a2e4d9c0a1a8f5dae3950e52a; Thu, 11 Apr 2019 15:00:50 +0000 (UTC) Content-Disposition: inline In-Reply-To: <83v9zk4o6l.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 77.238.176.206 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:235296 Archived-At: On Thu, Apr 11, 2019 at 05:22:10PM +0300, Eli Zaretskii wrote: >> Date: Thu, 11 Apr 2019 03:16:59 +0200 >> From: Ergus >> Cc: help-gnu-emacs@gnu.org >> >> But other common policies around are: >> >> 1) add only tabs (and ignore the small mismatch in some cases) >> >> int function(int var1, >> ------->double b, >> ------->double c) >> { >> ------->for (int i = 0; i < 10; ++i) >> ------->------->myprintf ("%d\n", >> ------->------->------->i); >> } > >AFAIU, this is the 'linux' style in CC Mode. No, the linux style is the first example I inserted in my mail. With some spaces to align. Like this (or at least this is what I get) int function(int var1, ------->.....double b, ------->.....double c) { ------->for (int i = 0; i < 10; ++i) ------->------->myprintf ("%d\n", ------->------->------->..i); } The indent-tabs-mode inserts "as many tabs as possible" and then aligns with spaces. > >> 2) Use tabs (but only for indentation) and spaces to align >> >> int function(int var1, >> .............double b) >> { >> ------->for (int i = 0; i < 10; ++i) >> ------->------->myprintf ("%d\n", >> ------->------->..........i); >> } > >And this is the 'bsd' style. > bsd style defines 4 spaces after tabulator align for continuation lines, not alineation with spaces. >Can you use these built-in styles to get what you want? Or did I >misunderstand what you are looking for? According with Alan's mail the policy is not included and it needs a workaround he sent in his email as an answer to a mail from 2008.