GNU Emacs Manual - Motion in C

Go to the first, previous, next, last section, table of contents.

### C Mode Motion Commands

This section describes commands for moving point, in C mode and related modes.

`C-c C-u`
  Move point back to the containing preprocessor conditional, leaving the mark behind. A prefix argument acts as a repeat count. With a negative argument, move point forward to the end of the containing preprocessor conditional. When going backwards, `#elif` is treated like `#else` followed by `#if`. When going forwards, `#elif` is ignored.
`C-c C-p`
  Move point back over a preprocessor conditional, leaving the mark behind. A prefix argument acts as a repeat count. With a negative argument, move forward.
`C-c C-n`
  Move point forward across a preprocessor conditional, leaving the mark behind. A prefix argument acts as a repeat count. With a negative argument, move backward.
`M-a`
  Move point to the beginning of the innermost C statement (`c-beginning-of-statement`). If point is already at the beginning of a statement, move to the beginning of the preceding statement. With prefix argument n, move back n - 1 statements. If point is within a string or comment, or next to a comment (only whitespace between them), this command moves by sentences instead of statements. When called from a program, this function takes three optional arguments: the numeric prefix argument, a buffer position limit (don't move back before that place), and a flag that controls whether to do sentence motion when inside of a comment.
`M-e`
  Move point to the end of the innermost C statement; like `M-a` except that it moves in the other direction (`c-end-of-statement`).
`M-x c-backward-into-nomenclature`
  Move point backward to beginning of a C++ nomenclature section or word. With prefix argument n, move n times. If n is negative, move forward. C++ nomenclature means a symbol name in the style of NamingSymbolsWithMixedCaseAndNoUnderlines; each capital letter begins a section or word. In the GNU project, we recommend using underscores to separate words within an identifier in C or C++, rather than using case distinctions.
`M-x c-forward-into-nomenclature`
  Move point forward to end of a C++ nomenclature section or word. With prefix argument n, move n times.

Go to the first, previous, next, last section, table of contents.