From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Baloff Newsgroups: gmane.emacs.help Subject: Re: marrying braket for ?: operator Date: 29 Jul 2005 18:22:26 +1000 Organization: iPrimus Customer - reports relating to abuse should be sent to abuse@iprimus.com.au Message-ID: <87ll3qaunx.fsf@wash.edu> References: <878xzr33rg.fsf@wash.edu> <3qkbcd.u8.ln@acm.acm> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1122627493 3013 80.91.229.2 (29 Jul 2005 08:58:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 29 Jul 2005 08:58:13 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 29 10:58:05 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DyQg5-00043b-Co for geh-help-gnu-emacs@m.gmane.org; Fri, 29 Jul 2005 10:57:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DyQiZ-00062y-7O for geh-help-gnu-emacs@m.gmane.org; Fri, 29 Jul 2005 04:59:47 -0400 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 X-Original-NNTP-Posting-Host: 210.50.67.211 X-Original-NNTP-Posting-Host: 127.0.0.1 Original-Lines: 54 Original-NNTP-Posting-Host: 203.134.67.67 Original-X-Trace: 1122624184 un-2park-reader-02.sydney.pipenetworks.com.au 890 203.134.67.67:4741 Original-X-Complaints-To: Abuse, including message IDs to abuse@pipenetworks.com Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.kjsl.com!news.spies.com!newsfeed-3001.bay.webtv.net!news.moat.net!quokka.wn.com.au!token.pipenetworks.com!218.100.2.58.MISMATCH!not-for-mail Original-Xref: shelby.stanford.edu gnu.emacs.help:132749 Original-To: help-gnu-emacs@gnu.org 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:28273 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:28273 Alan Mackenzie writes: > Robert Marshall wrote on Thu, 28 Jul > 2005 21:06:20 +0100: > > > On Thu, 28 Jul 2005, Alan Mackenzie wrote: > > >> Baloff wrote on 28 Jul 2005 15:20:51 +1000: > >>> Hello > > >>> when I move my pointer to a braket, it highlight its marrying > >>> braket. but how can I get it to do the same with the ternary > >>> if-else operator (?:) I hope this is a good group for this question > >>> otherwise please point me. > > >> It's exactly the right group! > > >> There is no command which jumps from a ? to it's : or vice versa. > >> Maybe there should be one. Maybe somebody, somewhere, has > >> implemented one, and will jump in here with a URL pointing to the > >> source code. > > >> The thing is, though, how useful would this command be? Programmers > >> tend not to nest these conditional expressions very much. The > >> command would have to bound to a key sequence, something like C-c : > >> (that's "control-c colon"). By the time you've typed that in, you > >> could just as well have found the colon by interactive search by > >> typing C-s :. > > > > And it's probably not straightforward (for either case), you might have > > > (x > 4) ? weeble::kerplunk(funky::gibbon ? whoop : holler()) : foible::gibber::eugh(); > > Believe me, compared with some of the stuff that's already in CC Mode, > that's nothing. ;-) > > > Robert > > -- > > La grenouille songe..dans son château d'eau > > -- > Alan Mackenzie (Munich, Germany) > Email: aacm@muuc.dee; to decode, wherever there is a repeated letter > (like "aa"), remove half of them (leaving, say, "a"). thanks now that you know my .emacs and the lot how can I get enum colors { to go to a new line and indent like when I type say main(){ or for(...) { thanks