help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C - marking code between braces.


From: Dieter Wilhelm
Subject: Re: C - marking code between braces.
Date: Mon, 11 Dec 2006 03:32:53 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux)

Kevin Rodgers <address@hidden> writes:

> Pawel wrote:
>> Could You tell me whether is there command in emacs that is able to
>> mark code between braces, but not braces themselves?
>
> C-x (                                 ; kmacro-start-macro (Emacs 22)/
>                                       ; start-kbd-macro
>
> C-M-u                                 ; backward-up-list
> C-@                                   ; set-mark-command
> C-M-f                                 ; forward-sexp
> C-b                                   ; backward-char
> C-x C-x                                       ; exchange-point-and-mark
> C-f                                   ; forward-char
>
> C-x )                                 ; kmacro-end-macro (Emacs 22)/
>                                       ; end-kdb-macro

C-M-u
C-M-SPC
C-f
C-x C-x
C-b

or for only *one* level of braces

C-M-u
C-f
C-s }
C-b 

but this sets (marks) only the proper region and does not activate
(highlight) it.

Another idea for one level could be

C-M-r [^{}]+
C-M-s

but to my astonishment C-M-r does not skip to the char behind {!


-- 
    Best wishes

    H. Dieter Wilhelm
    Darmstadt, Germany




reply via email to

[Prev in Thread] Current Thread [Next in Thread]