From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: pjb@informatimago.com (Pascal J. Bourguignon) Newsgroups: gmane.emacs.help Subject: Re: Tabs and Spaces Date: Mon, 25 May 2009 18:38:00 +0200 Organization: Anevia SAS Message-ID: <7cocth87fb.fsf@pbourguignon.anevia.com> References: <77vbbiF1jhhubU1@mid.individual.net> <7chbz9bdyu.fsf@pbourguignon.informatimago.com> <77vgiiF1jjcfrU1@mid.individual.net> <7czld19ttv.fsf@pbourguignon.informatimago.com> <77vq0cF1jh3k6U1@mid.individual.net> <87vdnpmd60.fsf@iki.fi> <77vthvF1jts3gU1@mid.individual.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1243269928 22782 80.91.229.12 (25 May 2009 16:45:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 May 2009 16:45:28 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon May 25 18:45:21 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M8dHS-0007UK-SD for geh-help-gnu-emacs@m.gmane.org; Mon, 25 May 2009 18:44:07 +0200 Original-Received: from localhost ([127.0.0.1]:35297 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M8dHS-0003Vo-1F for geh-help-gnu-emacs@m.gmane.org; Mon, 25 May 2009 12:44:06 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!cleanfeed4-a.proxad.net!nnrp8-2.free.fr!not-for-mail Original-Newsgroups: gnu.emacs.help Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en X-Disabled: X-No-Archive: no User-Agent: Gnus/5.101 (Gnus v5.10.10) Emacs/22.2 (gnu/linux) Cancel-Lock: sha1:OTY2ZDMxYjk1YTJiYmM5ZjYyNjFmZTg0MDE5ZDg3N2M1MmRjMTM4NA== Original-Lines: 53 Original-NNTP-Posting-Date: 25 May 2009 18:38:00 MEST Original-NNTP-Posting-Host: 88.170.236.224 Original-X-Trace: 1243269480 news-3.free.fr 6026 88.170.236.224:44266 Original-X-Complaints-To: abuse@proxad.net Original-Xref: news.stanford.edu gnu.emacs.help:169475 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:64706 Archived-At: use.address@my.homepage.invalid (Chris Gordon-Smith) writes: > Teemu Likonen wrote: >> On 2009-05-25 14:58 (UTC), Chris Gordon-Smith wrote: >> >>> C++. But I had already established before my original post that the >>> standard emacs indenting would not suit me. Perhaps I should have >>> mentioned this. >> >> Fortunately C++ indentation is very much configurable. There are several >> predefined styles which you can change with "C-c ." (c-set-style) >> command. If none of them suit you you can create your own. For more info >> see the CC Mode info node >> >> C-h i d m CC Mode RET > > Thanks. > > I think the complicating factor for me is that I use my own syntax, with > macros instead of curly brackets ({}). This is not generally liked in the > C++ world, but it works well for me. For example:- > > #define THEN { // Macro for modified syntax > // etc... > > int x = 10; > if (x ==9) > THEN > // Do Something > ELSEIF (x == 9) > THEN > // Do something else > ELSE > // Do yet another thisg > ENDIF > > I doubt whether any of the existing indenting styles can cope with this, so > I suppose I'll need to write a new configuration. > > Until I know how to do this, I would like a very simple behaviour in which > pressing tab simply causes the relevant number of spaces to be inserted. Yes, indeed you will have to implement your own parsing. If your macros could result in a syntax close enough to Pascal or Modula-2 you could try to use one of these language mode. But it won't work well until you code your own indentation stuff. Check cedet! -- __Pascal Bourguignon__