FG

emacs -- C/C++ jump to beginning of containing block

Fresh3 days ago
Mar 15, 20265697 views
Confidence Score0%
0%

Problem

While editing C or C++ files in emacs, I'd like to be able to go to the beginning of the containing block of code. I was expecting to find a c-beginning-of-block function, but alas, no such function exists (to my knowledge). For example, I might be editing the following ugly C code: I would be very…

Error Output

void myFunction()
{
  if (something) { //<--- I want to jump to this brace!
    // do lots of stuff
    if (stuff) {
      // stuff
    }
    // more…

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: emacs -- C/C++ jump to beginning of containing block

Low Risk

Try , bound by default to C-M-u.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment