== C / C mode ==
Method for specifying C mode: generally automatically set according to the extension, do not specify, but sometimes you want
Wang .h file is C mode (default is C mode), add it on the first line of the file (or at the end)
/ / - * - C - * -
The syntax is highlighting: Not C mode is proprietary, by the way, M-X Global-Font-Lock-Mode RET or
Add (GLOBAL-FONT-LOCK-MODE T). Under Console, Emacs21 supports language
The law is highlighted. (The grammat is highlighted, different keywords are highlighted in different colors)
Sub mode:
Auto-State Automatically indentation when you enter, automatically wrap
Hungry-State When you BackSpace, automatically remove as much blank and blank line
C-C C-T Convert (On / Off) Auto-State and Hungry-State Submetry
C-C C-A Convert Auto-State Submetry
C-C C-D Convert Hungry-State Submetry
C-c. Set the indentation style (according to the Tab button, the available style, the default is GNU,
The indentation is 2 characters; Linux is 8; K & R is 5 ...)
Tab retrans into the current line
M- / automatic complement (string can be found in the buffer)
M-; joining the notes
C-C C-E expansion macro
C-C C-C comment out of the entire area
C-C C- / Each of the rows in the region is added to a '/' character
=== Compilation and debug ===
M-X Compile Ret Compile
M-X GDB RET debugging
C-X `(in error message) Next error, one window displays the error message, the other
Display the error position of the source code
C-C C-C goes to an error position
After starting the GDB debugger, the cursor is in the source file buffer:
C-X SPC sets breakpoints in current line
C-X C-a C-S Step
C-X C-a C-N Next
C-X C-a C-T TBREAK
C-X C-a C-R Continue
Local Variables:
Mode: Text
Coding: GB2312
Fill-Column: 72
End: