tags:

views:

50

answers:

1

Is there a built-in or 3rd party elisp command to move to the matching brace in cc-mode?

I currently use (paren-set-mode 'paren t) to have XEmacs highlight the matching brace or paren, but when the brace is off the screen in a piece of code with nested if blocks, it would be very useful to have a command to jump to the matching brace.

Something similar to M-C-f and M-C-b but for {} rather than ().

+2  A: 

C-M-f and C-M-b should work for { and } as well.

pib
It doesn't seem to in XEmacs 21.4.21. When I hit `C-M-f` at the first brace it jumps to the next `)` rather than to the closing brace for the current block.
LordOphidian
Never mind. Looks like I didn't have the point on the right char. You need to have the point on the opening brace for `C-M-f` and one char after the closing brace for `C-M-b`.
LordOphidian