Search code examples
emacsc-mode

How to select (mark) the body of a C function in emacs?


I used to remember a key combination in c-mode to select a C function (i mean select the text between start and end of function for copying/killing etc) but i've since forgotten it and can't seem to find it anywhere. Does anyone remember what this key combination is?


Solution

  • In Emacs 23, it appears to be bound to:

    C-M-h           c-mark-function
    

    FWIW, I found this by listing all the commands for the mode C-h b, and searching for 'mark'.