[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: marrying braket for ?: operator
From: |
Baloff |
Subject: |
Re: marrying braket for ?: operator |
Date: |
29 Jul 2005 18:22:26 +1000 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
Alan Mackenzie <acm@muc.de> writes:
> Robert Marshall <spam@chezmarshall.freeserve.co.uk> wrote on Thu, 28 Jul
> 2005 21:06:20 +0100:
>
> > On Thu, 28 Jul 2005, Alan Mackenzie wrote:
>
> >> Baloff <washdc@wash.edu> 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