diff options
Diffstat (limited to 'doc/misc/cc-mode.texi')
| -rw-r--r-- | doc/misc/cc-mode.texi | 195 |
1 files changed, 150 insertions, 45 deletions
diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi index a9339162666..1a192123c3e 100644 --- a/doc/misc/cc-mode.texi +++ b/doc/misc/cc-mode.texi | |||
| @@ -147,10 +147,7 @@ CC Mode | |||
| 147 | @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | 147 | @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 148 | 148 | ||
| 149 | @comment Define an index for syntactic symbols. | 149 | @comment Define an index for syntactic symbols. |
| 150 | @ifnottex @c In texi2dvi, the @defindex would create an empty cc-mode.ss | ||
| 151 | @c For Info, unlike tex, @syncodeindex needs a matching @defindex. | ||
| 152 | @defindex ss | 150 | @defindex ss |
| 153 | @end ifnottex | ||
| 154 | 151 | ||
| 155 | @comment Combine key, syntactic symbol and concept indices into one. | 152 | @comment Combine key, syntactic symbol and concept indices into one. |
| 156 | @syncodeindex ss cp | 153 | @syncodeindex ss cp |
| @@ -159,7 +156,7 @@ CC Mode | |||
| 159 | @copying | 156 | @copying |
| 160 | This manual is for CC Mode in Emacs. | 157 | This manual is for CC Mode in Emacs. |
| 161 | 158 | ||
| 162 | Copyright @copyright{} 1995-2011 Free Software Foundation, Inc. | 159 | Copyright @copyright{} 1995-2012 Free Software Foundation, Inc. |
| 163 | 160 | ||
| 164 | @quotation | 161 | @quotation |
| 165 | Permission is granted to copy, distribute and/or modify this document | 162 | Permission is granted to copy, distribute and/or modify this document |
| @@ -190,7 +187,7 @@ developing GNU and promoting software freedom.'' | |||
| 190 | @titlepage | 187 | @titlepage |
| 191 | @sp 10 | 188 | @sp 10 |
| 192 | 189 | ||
| 193 | @center @titlefont{CC Mode 5.31} | 190 | @center @titlefont{CC Mode 5.32} |
| 194 | @sp 2 | 191 | @sp 2 |
| 195 | @center @subtitlefont{A GNU Emacs mode for editing C and C-like languages} | 192 | @center @subtitlefont{A GNU Emacs mode for editing C and C-like languages} |
| 196 | @sp 2 | 193 | @sp 2 |
| @@ -287,11 +284,11 @@ Configuration Basics | |||
| 287 | 284 | ||
| 288 | Styles | 285 | Styles |
| 289 | 286 | ||
| 290 | * Built-in Styles:: | 287 | * Built-in Styles:: |
| 291 | * Choosing a Style:: | 288 | * Choosing a Style:: |
| 292 | * Adding Styles:: | 289 | * Adding Styles:: |
| 293 | * Guessing the Style:: | 290 | * Guessing the Style:: |
| 294 | * File Styles:: | 291 | * File Styles:: |
| 295 | 292 | ||
| 296 | Customizing Auto-newlines | 293 | Customizing Auto-newlines |
| 297 | 294 | ||
| @@ -311,19 +308,19 @@ Indentation Engine Basics | |||
| 311 | 308 | ||
| 312 | Syntactic Symbols | 309 | Syntactic Symbols |
| 313 | 310 | ||
| 314 | * Function Symbols:: | 311 | * Function Symbols:: |
| 315 | * Class Symbols:: | 312 | * Class Symbols:: |
| 316 | * Conditional Construct Symbols:: | 313 | * Conditional Construct Symbols:: |
| 317 | * Switch Statement Symbols:: | 314 | * Switch Statement Symbols:: |
| 318 | * Brace List Symbols:: | 315 | * Brace List Symbols:: |
| 319 | * External Scope Symbols:: | 316 | * External Scope Symbols:: |
| 320 | * Paren List Symbols:: | 317 | * Paren List Symbols:: |
| 321 | * Literal Symbols:: | 318 | * Literal Symbols:: |
| 322 | * Multiline Macro Symbols:: | 319 | * Multiline Macro Symbols:: |
| 323 | * Objective-C Method Symbols:: | 320 | * Objective-C Method Symbols:: |
| 324 | * Java Symbols:: | 321 | * Java Symbols:: |
| 325 | * Statement Block Symbols:: | 322 | * Statement Block Symbols:: |
| 326 | * K&R Symbols:: | 323 | * K&R Symbols:: |
| 327 | 324 | ||
| 328 | Customizing Indentation | 325 | Customizing Indentation |
| 329 | 326 | ||
| @@ -341,6 +338,11 @@ Line-Up Functions | |||
| 341 | * Comment Line-Up:: | 338 | * Comment Line-Up:: |
| 342 | * Misc Line-Up:: | 339 | * Misc Line-Up:: |
| 343 | 340 | ||
| 341 | Customizing Macros | ||
| 342 | |||
| 343 | * Macro Backslashes:: | ||
| 344 | * Macros with ;:: | ||
| 345 | |||
| 344 | @end detailmenu | 346 | @end detailmenu |
| 345 | @end menu | 347 | @end menu |
| 346 | 348 | ||
| @@ -373,7 +375,7 @@ was added in version 5.30. | |||
| 373 | 375 | ||
| 374 | This manual describes @ccmode{} | 376 | This manual describes @ccmode{} |
| 375 | @comment The following line must appear on its own, so that the | 377 | @comment The following line must appear on its own, so that the |
| 376 | version 5.31. | 378 | version 5.32. |
| 377 | @comment Release.py script can update the version number automatically | 379 | @comment Release.py script can update the version number automatically |
| 378 | 380 | ||
| 379 | @ccmode{} supports the editing of K&R and ANSI C, C++, Objective-C, | 381 | @ccmode{} supports the editing of K&R and ANSI C, C++, Objective-C, |
| @@ -655,6 +657,10 @@ expression, to some statements, or perhaps to whole functions, the | |||
| 655 | syntactic recognition can be wrong. @ccmode{} manages to figure it | 657 | syntactic recognition can be wrong. @ccmode{} manages to figure it |
| 656 | out correctly most of the time, though. | 658 | out correctly most of the time, though. |
| 657 | 659 | ||
| 660 | Some macros, when invoked, ''have their own semicolon''. To get the | ||
| 661 | next line indented correctly, rather than as a continuation line, | ||
| 662 | @xref{Macros with ;}. | ||
| 663 | |||
| 658 | Reindenting large sections of code can take a long time. When | 664 | Reindenting large sections of code can take a long time. When |
| 659 | @ccmode{} reindents a region of code, it is essentially equivalent to | 665 | @ccmode{} reindents a region of code, it is essentially equivalent to |
| 660 | hitting @key{TAB} on every line of the region. | 666 | hitting @key{TAB} on every line of the region. |
| @@ -882,6 +888,8 @@ lines. | |||
| 882 | @itemx @kbd{C-M-e} (@code{c-end-of-defun}) | 888 | @itemx @kbd{C-M-e} (@code{c-end-of-defun}) |
| 883 | @findex c-beginning-of-defun | 889 | @findex c-beginning-of-defun |
| 884 | @findex c-end-of-defun | 890 | @findex c-end-of-defun |
| 891 | @vindex c-defun-tactic | ||
| 892 | @vindex defun-tactic (c-) | ||
| 885 | 893 | ||
| 886 | Move to the beginning or end of the current or next function. Other | 894 | Move to the beginning or end of the current or next function. Other |
| 887 | constructs (such as a structs or classes) which have a brace block | 895 | constructs (such as a structs or classes) which have a brace block |
| @@ -895,6 +903,15 @@ commands try to leave point at the beginning of a line near the actual | |||
| 895 | start or end of the function. This occasionally causes point not to | 903 | start or end of the function. This occasionally causes point not to |
| 896 | move at all. | 904 | move at all. |
| 897 | 905 | ||
| 906 | By default, these commands will recognize functions contained within a | ||
| 907 | @dfn{declaration scope} such as a C++ @code{class} or @code{namespace} | ||
| 908 | construct, should the point start inside it. If @ccmode fails to find | ||
| 909 | function beginnings or ends inside the current declaration scope, it | ||
| 910 | will search the enclosing scopes. If you want @ccmode to recognize | ||
| 911 | functions only at the top level@footnote{this was @ccmode{}'s | ||
| 912 | behavior prior to version 5.32.}, set @code{c-defun-tactic} to | ||
| 913 | @code{t}. | ||
| 914 | |||
| 898 | These functions are analogous to the Emacs built-in commands | 915 | These functions are analogous to the Emacs built-in commands |
| 899 | @code{beginning-of-defun} and @code{end-of-defun}, except they | 916 | @code{beginning-of-defun} and @code{end-of-defun}, except they |
| 900 | eliminate the constraint that the top-level opening brace of the defun | 917 | eliminate the constraint that the top-level opening brace of the defun |
| @@ -1153,7 +1170,7 @@ Full details on how these minor modes work are at @ref{Electric Keys}, | |||
| 1153 | and @ref{Indentation Engine Basics}. | 1170 | and @ref{Indentation Engine Basics}. |
| 1154 | 1171 | ||
| 1155 | You can toggle each of these minor modes on and off, and you can | 1172 | You can toggle each of these minor modes on and off, and you can |
| 1156 | configure @ccmode{} so that it starts up with your favourite | 1173 | configure @ccmode{} so that it starts up with your favorite |
| 1157 | combination of them (@pxref{Sample .emacs File}). By default, when | 1174 | combination of them (@pxref{Sample .emacs File}). By default, when |
| 1158 | you initialize a buffer, electric mode and syntactic-indentation mode | 1175 | you initialize a buffer, electric mode and syntactic-indentation mode |
| 1159 | are enabled but the other two modes are disabled. | 1176 | are enabled but the other two modes are disabled. |
| @@ -2140,7 +2157,7 @@ A space between the function name and opening parenthesis when calling | |||
| 2140 | a user function. The last character of the function name and the | 2157 | a user function. The last character of the function name and the |
| 2141 | opening parenthesis are highlighted. This font-locking rule will | 2158 | opening parenthesis are highlighted. This font-locking rule will |
| 2142 | spuriously highlight a valid concatenation expression where an | 2159 | spuriously highlight a valid concatenation expression where an |
| 2143 | identifier precedes a parenthesised expression. Unfortunately. | 2160 | identifier precedes a parenthesized expression. Unfortunately. |
| 2144 | 2161 | ||
| 2145 | @item | 2162 | @item |
| 2146 | Whitespace following the @samp{\} in what otherwise looks like an | 2163 | Whitespace following the @samp{\} in what otherwise looks like an |
| @@ -2180,7 +2197,7 @@ method, ``Top-level commands or the customization interface''. | |||
| 2180 | 2197 | ||
| 2181 | If you make conflicting settings in several of these ways, the way | 2198 | If you make conflicting settings in several of these ways, the way |
| 2182 | that takes precedence is the one that appears latest in this list: | 2199 | that takes precedence is the one that appears latest in this list: |
| 2183 | @itemize @asis | 2200 | @itemize @w{} |
| 2184 | @item | 2201 | @item |
| 2185 | @table @asis | 2202 | @table @asis |
| 2186 | @item Style | 2203 | @item Style |
| @@ -2517,11 +2534,11 @@ As an alternative to writing a style definition yourself, you can have | |||
| 2517 | already formatted piece of your code, @ref{Guessing the Style}. | 2534 | already formatted piece of your code, @ref{Guessing the Style}. |
| 2518 | 2535 | ||
| 2519 | @menu | 2536 | @menu |
| 2520 | * Built-in Styles:: | 2537 | * Built-in Styles:: |
| 2521 | * Choosing a Style:: | 2538 | * Choosing a Style:: |
| 2522 | * Adding Styles:: | 2539 | * Adding Styles:: |
| 2523 | * Guessing the Style:: | 2540 | * Guessing the Style:: |
| 2524 | * File Styles:: | 2541 | * File Styles:: |
| 2525 | @end menu | 2542 | @end menu |
| 2526 | 2543 | ||
| 2527 | @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | 2544 | @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| @@ -4246,19 +4263,19 @@ Java. @ref{Java Symbols}. | |||
| 4246 | @end table | 4263 | @end table |
| 4247 | 4264 | ||
| 4248 | @menu | 4265 | @menu |
| 4249 | * Function Symbols:: | 4266 | * Function Symbols:: |
| 4250 | * Class Symbols:: | 4267 | * Class Symbols:: |
| 4251 | * Conditional Construct Symbols:: | 4268 | * Conditional Construct Symbols:: |
| 4252 | * Switch Statement Symbols:: | 4269 | * Switch Statement Symbols:: |
| 4253 | * Brace List Symbols:: | 4270 | * Brace List Symbols:: |
| 4254 | * External Scope Symbols:: | 4271 | * External Scope Symbols:: |
| 4255 | * Paren List Symbols:: | 4272 | * Paren List Symbols:: |
| 4256 | * Literal Symbols:: | 4273 | * Literal Symbols:: |
| 4257 | * Multiline Macro Symbols:: | 4274 | * Multiline Macro Symbols:: |
| 4258 | * Objective-C Method Symbols:: | 4275 | * Objective-C Method Symbols:: |
| 4259 | * Java Symbols:: | 4276 | * Java Symbols:: |
| 4260 | * Statement Block Symbols:: | 4277 | * Statement Block Symbols:: |
| 4261 | * K&R Symbols:: | 4278 | * K&R Symbols:: |
| 4262 | @end menu | 4279 | @end menu |
| 4263 | 4280 | ||
| 4264 | @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | 4281 | @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| @@ -6550,6 +6567,9 @@ custom line-up function associated with it. | |||
| 6550 | @section Other Special Indentations | 6567 | @section Other Special Indentations |
| 6551 | @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | 6568 | @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 6552 | 6569 | ||
| 6570 | To configure macros which you invoke without a terminating @samp{;}, | ||
| 6571 | see @xref{Macros with ;}. | ||
| 6572 | |||
| 6553 | Here are the remaining odds and ends regarding indentation: | 6573 | Here are the remaining odds and ends regarding indentation: |
| 6554 | 6574 | ||
| 6555 | @defopt c-label-minimum-indentation | 6575 | @defopt c-label-minimum-indentation |
| @@ -6601,6 +6621,13 @@ functions to this hook, not remove them. @xref{Style Variables}. | |||
| 6601 | @cindex preprocessor directives | 6621 | @cindex preprocessor directives |
| 6602 | @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | 6622 | @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 6603 | 6623 | ||
| 6624 | Preprocessor macros in C, C++, and Objective C (introduced by | ||
| 6625 | @code{#define}) have a syntax different from the main language---for | ||
| 6626 | example, a macro declaration is not terminated by a semicolon, and if | ||
| 6627 | it is more than a line long, line breaks in it must be escaped with | ||
| 6628 | backslashes. @ccmode{} has some commands to manipulate these, see | ||
| 6629 | @ref{Macro Backslashes}. | ||
| 6630 | |||
| 6604 | Normally, the lines in a multi-line macro are indented relative to | 6631 | Normally, the lines in a multi-line macro are indented relative to |
| 6605 | each other as though they were code. You can suppress this behavior | 6632 | each other as though they were code. You can suppress this behavior |
| 6606 | by setting the following user option: | 6633 | by setting the following user option: |
| @@ -6612,6 +6639,28 @@ is @code{nil}, all lines inside macro definitions are analyzed as | |||
| 6612 | @code{cpp-macro-cont}. | 6639 | @code{cpp-macro-cont}. |
| 6613 | @end defopt | 6640 | @end defopt |
| 6614 | 6641 | ||
| 6642 | Because a macro can expand into anything at all, near where one is | ||
| 6643 | invoked @ccmode{} can only indent and fontify code heuristically. | ||
| 6644 | Sometimes it gets it wrong. Usually you should try to design your | ||
| 6645 | macros so that they ''look like ordinary code'' when you invoke them. | ||
| 6646 | However, one situation is so common that @ccmode{} handles it | ||
| 6647 | specially: that is when certain macros needn't (or mustn't) be | ||
| 6648 | followed by a @samp{;}. You need to configure @ccmode{} to handle | ||
| 6649 | these macros properly, see @ref{Macros with ;}. | ||
| 6650 | |||
| 6651 | @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
| 6652 | @menu | ||
| 6653 | * Macro Backslashes:: | ||
| 6654 | * Macros with ;:: | ||
| 6655 | @end menu | ||
| 6656 | |||
| 6657 | @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
| 6658 | @node Macro Backslashes, Macros with ;, Custom Macros, Custom Macros | ||
| 6659 | @comment node-name, next, previous, up | ||
| 6660 | @section Customizing Macro Backslashes | ||
| 6661 | @cindex @code{#define} | ||
| 6662 | @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
| 6663 | |||
| 6615 | @ccmode{} provides some tools to help keep the line continuation | 6664 | @ccmode{} provides some tools to help keep the line continuation |
| 6616 | backslashes in macros neat and tidy. Their precise action is | 6665 | backslashes in macros neat and tidy. Their precise action is |
| 6617 | customized with these variables: | 6666 | customized with these variables: |
| @@ -6654,6 +6703,62 @@ get aligned only when you explicitly invoke the command | |||
| 6654 | @end defopt | 6703 | @end defopt |
| 6655 | 6704 | ||
| 6656 | @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | 6705 | @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 6706 | @node Macros with ;, , Macro Backslashes, Custom Macros | ||
| 6707 | @comment node-name, next, previous, up | ||
| 6708 | @section Macros with semicolons | ||
| 6709 | @cindex macros with semicolons | ||
| 6710 | @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
| 6711 | Macros which needn't (or mustn't) be followed by a semicolon when you | ||
| 6712 | invoke them, @dfn{macros with semicolons}, are very common. These can | ||
| 6713 | cause @ccmode{} to parse the next line wrongly as a | ||
| 6714 | @code{statement-cont} (@pxref{Function Symbols}) and thus mis-indent | ||
| 6715 | it. | ||
| 6716 | |||
| 6717 | You can prevent this by specifying which macros have semicolons. It | ||
| 6718 | doesn't matter whether or not such a macro has a parameter list: | ||
| 6719 | |||
| 6720 | @defopt c-macro-names-with-semicolon | ||
| 6721 | @vindex macro-names-with-semicolon (c-) | ||
| 6722 | This buffer-local variable specifies which macros have semicolons. | ||
| 6723 | After setting its value, you need to call | ||
| 6724 | @code{c-make-macro-with-semi-re} for it to take effect. It should be | ||
| 6725 | set to one of these values: | ||
| 6726 | |||
| 6727 | @table @asis | ||
| 6728 | @item nil | ||
| 6729 | There are no macros with semicolons. | ||
| 6730 | @item a list of strings | ||
| 6731 | Each string is the name of a macro with a semicolon. Only valid | ||
| 6732 | @code{#define} names are allowed here. For example, to set the | ||
| 6733 | default value, you could write the following into your @file{.emacs}: | ||
| 6734 | |||
| 6735 | @example | ||
| 6736 | (setq c-macro-names-with-semicolon | ||
| 6737 | '("Q_OBJECT" "Q_PROPERTY" "Q_DECLARE" "Q_ENUMS")) | ||
| 6738 | @end example | ||
| 6739 | |||
| 6740 | @item a regular expression | ||
| 6741 | This matches each symbol which is a macro with a semicolon. It must | ||
| 6742 | not match any string which isn't a valid @code{#define} name. For | ||
| 6743 | example: | ||
| 6744 | |||
| 6745 | @example | ||
| 6746 | (setq c-macro-names-with-semicolon | ||
| 6747 | "\\<\\(CLEAN_UP_AND_RETURN\\|Q_[[:upper:]]+\\)\\>") | ||
| 6748 | @end example | ||
| 6749 | @end table | ||
| 6750 | @end defopt | ||
| 6751 | |||
| 6752 | @defun c-make-macro-with-semi-re | ||
| 6753 | @findex make-macro-with-semi-re (c-) | ||
| 6754 | Call this (non-interactive) function, which sets internal variables, | ||
| 6755 | each time you change the value of | ||
| 6756 | @code{c-macro-names-with-semicolon}. It takes no arguments, and its | ||
| 6757 | return value has no meaning. This function is called by @ccmode{}'s | ||
| 6758 | initialization code. | ||
| 6759 | @end defun | ||
| 6760 | |||
| 6761 | @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
| 6657 | @node Odds and Ends, Sample .emacs File, Custom Macros, Top | 6762 | @node Odds and Ends, Sample .emacs File, Custom Macros, Top |
| 6658 | @comment node-name, next, previous, up | 6763 | @comment node-name, next, previous, up |
| 6659 | @chapter Odds and Ends | 6764 | @chapter Odds and Ends |
| @@ -6837,7 +6942,7 @@ circumstances, can locate the top-most opening brace much more quickly than | |||
| 6837 | styles where these braces are hung (e.g. most JDK-derived Java styles), | 6942 | styles where these braces are hung (e.g. most JDK-derived Java styles), |
| 6838 | this hack can improve performance of the core syntax parsing routines | 6943 | this hack can improve performance of the core syntax parsing routines |
| 6839 | from 3 to 60 times. However, for styles which @emph{do} conform to | 6944 | from 3 to 60 times. However, for styles which @emph{do} conform to |
| 6840 | Emacs' recommended style of putting top-level braces in column zero, | 6945 | Emacs's recommended style of putting top-level braces in column zero, |
| 6841 | this hack can degrade performance by about as much. Thus this variable | 6946 | this hack can degrade performance by about as much. Thus this variable |
| 6842 | is set to @code{nil} by default, since the Emacs-friendly styles should | 6947 | is set to @code{nil} by default, since the Emacs-friendly styles should |
| 6843 | be more common (and encouraged!). Note that this variable has no effect | 6948 | be more common (and encouraged!). Note that this variable has no effect |
| @@ -6948,7 +7053,7 @@ Set the variable @code{c-basic-offset}. @xref{Getting Started}. | |||
| 6948 | @kindex C-j | 7053 | @kindex C-j |
| 6949 | @emph{Why doesn't the @kbd{RET} key indent the new line?} | 7054 | @emph{Why doesn't the @kbd{RET} key indent the new line?} |
| 6950 | 7055 | ||
| 6951 | Emacs' convention is that @kbd{RET} just adds a newline, and that | 7056 | Emacs's convention is that @kbd{RET} just adds a newline, and that |
| 6952 | @kbd{C-j} adds a newline and indents it. You can make @kbd{RET} do this | 7057 | @kbd{C-j} adds a newline and indents it. You can make @kbd{RET} do this |
| 6953 | too by adding this to your @code{c-initialization-hook}: | 7058 | too by adding this to your @code{c-initialization-hook}: |
| 6954 | 7059 | ||