diff options
| author | Richard M. Stallman | 2001-06-23 16:19:18 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2001-06-23 16:19:18 +0000 |
| commit | f772775cb8c49d5142bddbb27d451ab33d5034f3 (patch) | |
| tree | db264409b3b856ff45d9190a81f0551f8bd6596b | |
| parent | 0bae67ad54d7060b54cce77a083a3b4397a6410e (diff) | |
| download | emacs-f772775cb8c49d5142bddbb27d451ab33d5034f3.tar.gz emacs-f772775cb8c49d5142bddbb27d451ab33d5034f3.zip | |
Add details about C-M-a and C-M-e.
Index indent-for-tab-command.
Clarify TAB on lines inside paren grouping.
Clarify which languages a C style applies to.
Clarify how c-default-style takes effect.
c-set-style affects only current buffer.
Clarify blink-matching-delay.
| -rw-r--r-- | man/programs.texi | 130 | ||||
| -rw-r--r-- | src/ChangeLog | 4 |
2 files changed, 85 insertions, 49 deletions
diff --git a/man/programs.texi b/man/programs.texi index ec8e53c09b0..7ea7960177b 100644 --- a/man/programs.texi +++ b/man/programs.texi | |||
| @@ -351,6 +351,29 @@ Move to end of current or following defun (@code{end-of-defun}). | |||
| 351 | Put region around whole current or following defun (@code{mark-defun}). | 351 | Put region around whole current or following defun (@code{mark-defun}). |
| 352 | @end table | 352 | @end table |
| 353 | 353 | ||
| 354 | @cindex move to beginning or end of function | ||
| 355 | @cindex function, move to beginning or end | ||
| 356 | @kindex C-M-a | ||
| 357 | @kindex C-M-e | ||
| 358 | @kindex C-M-h | ||
| 359 | @findex beginning-of-defun | ||
| 360 | @findex end-of-defun | ||
| 361 | @findex mark-defun | ||
| 362 | The commands to move to the beginning and end of the current defun | ||
| 363 | are @kbd{C-M-a} (@code{beginning-of-defun}) and @kbd{C-M-e} | ||
| 364 | (@code{end-of-defun}). If you repeat one of these commands, or use a | ||
| 365 | positive numeric argument, each repetition moves to the next defun in | ||
| 366 | the direction of motion. | ||
| 367 | |||
| 368 | @kbd{C-M-a} with a negative argument @minus{}@var{n} moves forward | ||
| 369 | @var{n} times to the next beginning of a defun. This is not exactly | ||
| 370 | the same place that @kbd{C-M-e} with argument @var{n} would move to; | ||
| 371 | the end of this defun is not usually exactly the same place as the | ||
| 372 | beginning of the following defun. (Typically whitespace or comments | ||
| 373 | separate them.) Likewise, @kbd{C-M-e} with a negative argument moves | ||
| 374 | back to an end of a defun, which is not quite the same as @kbd{C-M-a} | ||
| 375 | with a positive argument. | ||
| 376 | |||
| 354 | @kindex C-M-h @r{(C mode)} | 377 | @kindex C-M-h @r{(C mode)} |
| 355 | @findex c-mark-function | 378 | @findex c-mark-function |
| 356 | If you wish to operate on the current defun, use @kbd{C-M-h} | 379 | If you wish to operate on the current defun, use @kbd{C-M-h} |
| @@ -423,6 +446,7 @@ Equivalent to @key{RET} followed by @key{TAB} (@code{newline-and-indent}). | |||
| 423 | @kindex TAB @r{(programming modes)} | 446 | @kindex TAB @r{(programming modes)} |
| 424 | @findex c-indent-command | 447 | @findex c-indent-command |
| 425 | @findex indent-line-function | 448 | @findex indent-line-function |
| 449 | @findex indent-for-tab-command | ||
| 426 | The basic indentation command is @key{TAB}, which gives the current line | 450 | The basic indentation command is @key{TAB}, which gives the current line |
| 427 | the correct indentation as determined from the previous lines. The | 451 | the correct indentation as determined from the previous lines. The |
| 428 | function that @key{TAB} runs depends on the major mode; it is | 452 | function that @key{TAB} runs depends on the major mode; it is |
| @@ -445,12 +469,12 @@ the characters around it. | |||
| 445 | followed by a @key{TAB}. @kbd{C-j} at the end of a line creates a | 469 | followed by a @key{TAB}. @kbd{C-j} at the end of a line creates a |
| 446 | blank line and then gives it the appropriate indentation. | 470 | blank line and then gives it the appropriate indentation. |
| 447 | 471 | ||
| 448 | @key{TAB} indents the second and following lines of the body of a | 472 | @key{TAB} indents lines that start within a parenthetical grouping |
| 449 | parenthetical grouping each under the preceding one; therefore, if you | 473 | each under the preceding line (or the text after the parenthesis). |
| 450 | alter one line's indentation to be nonstandard, the lines below will | 474 | Therefore, if you manually give one of these lines a nonstandard |
| 451 | tend to follow it. This behavior is convenient in cases where you have | 475 | indentation, the lines below will tend to follow it. This behavior is |
| 452 | overridden the standard result of @key{TAB} because you find it | 476 | convenient in cases where you have overridden the standard result of |
| 453 | unaesthetic for a particular line. | 477 | @key{TAB} because you find it unaesthetic for a particular line. |
| 454 | 478 | ||
| 455 | Remember that an open-parenthesis, open-brace or other opening delimiter | 479 | Remember that an open-parenthesis, open-brace or other opening delimiter |
| 456 | at the left margin is assumed by Emacs (including the indentation routines) | 480 | at the left margin is assumed by Emacs (including the indentation routines) |
| @@ -1129,24 +1153,28 @@ the variable @code{c-comment-only-line-offset} (@pxref{Comments in C}). | |||
| 1129 | @subsubsection C Indentation Styles | 1153 | @subsubsection C Indentation Styles |
| 1130 | @cindex c indentation styles | 1154 | @cindex c indentation styles |
| 1131 | 1155 | ||
| 1132 | A @dfn{C style} is a collection of indentation style customizations. | 1156 | A @dfn{C style} is a collection of indentation style customizations |
| 1133 | Emacs comes with several predefined indentation styles for C and related | 1157 | that can be used in C mode and the related modes. Emacs comes with |
| 1134 | modes, including @code{gnu}, @code{k&r}, @code{bsd}, @code{stroustrup}, | 1158 | several predefined C styles, including @code{gnu}, @code{k&r}, |
| 1135 | @code{linux}, @code{python}, @code{java}, @code{whitesmith}, | 1159 | @code{bsd}, @code{stroustrup}, @code{linux}, @code{python}, |
| 1136 | @code{ellemtel}, @code{cc-mode}, and @code{user}. | 1160 | @code{java}, @code{whitesmith}, @code{ellemtel}, @code{cc-mode}, and |
| 1161 | @code{user}. Some of these styles are primarily intended for one | ||
| 1162 | language, but any of them can be used with any of the languages | ||
| 1163 | supported by these modes. | ||
| 1137 | 1164 | ||
| 1138 | @findex c-set-style | 1165 | @findex c-set-style |
| 1139 | To choose the style you want, use the command @kbd{M-x c-set-style}. | 1166 | To choose a style for the current buffer, use the command @kbd{M-x |
| 1140 | Specify a style name as an argument (case is not significant in C style | 1167 | c-set-style}. Specify a style name as an argument (case is not |
| 1141 | names). The chosen style only affects newly visited buffers, not those | 1168 | significant in C style names). This command affects the current |
| 1142 | you are already editing; to reindent an existing buffer, switch to that | 1169 | buffer only, but it affects only future invocations of the indentation |
| 1143 | buffer and type @kbd{C-x h C-M-\}. | 1170 | command; it does not change the indentation of the code in the buffer. |
| 1171 | To reindent the text, you can type @kbd{C-x h C-M-\}. | ||
| 1144 | 1172 | ||
| 1145 | @vindex c-default-style | 1173 | @vindex c-default-style |
| 1146 | You can also set the variable @code{c-default-style} to specify the | 1174 | You can also set the variable @code{c-default-style} to specify the |
| 1147 | style for various major modes. Its value should be an alist, in which | 1175 | default style for various major modes. Its value should be an alist, |
| 1148 | each element specifies one major mode and which indentation style to use | 1176 | in which each element specifies one major mode and which indentation |
| 1149 | for it. For example, | 1177 | style to use for it. For example, |
| 1150 | 1178 | ||
| 1151 | @example | 1179 | @example |
| 1152 | (setq c-default-style | 1180 | (setq c-default-style |
| @@ -1155,14 +1183,17 @@ for it. For example, | |||
| 1155 | 1183 | ||
| 1156 | @noindent | 1184 | @noindent |
| 1157 | specifies an explicit choice for Java mode, and the default @samp{gnu} | 1185 | specifies an explicit choice for Java mode, and the default @samp{gnu} |
| 1158 | style for the other C-like modes. | 1186 | style for the other C-like modes. This variable takes effect when you |
| 1159 | 1187 | switch to one of the C-like major modes; thus, if you specify a new | |
| 1160 | The @code{gnu} style defines the formatting recommend by the GNU | 1188 | default style for Java mode, you can make it take effect in an |
| 1161 | Project; it is the default, so as to encourage the indentation we | 1189 | existing Java mode buffer by typing @kbd{M-x java-mode} there. |
| 1162 | recommend. However, if you make changes in variables such as | 1190 | |
| 1191 | The @code{gnu} style specifies the formatting recommended by the GNU | ||
| 1192 | Project for C; it is the default, so as to encourage use of our | ||
| 1193 | recommended style. If you make changes in variables such as | ||
| 1163 | @code{c-basic-offset} and @code{c-offsets-alist} in your | 1194 | @code{c-basic-offset} and @code{c-offsets-alist} in your |
| 1164 | @file{~/.emacs} file, your changes override the what @code{gnu} style | 1195 | @file{~/.emacs} file, those changes override what the @code{gnu} style |
| 1165 | says. | 1196 | specifies. |
| 1166 | 1197 | ||
| 1167 | @findex c-add-style | 1198 | @findex c-add-style |
| 1168 | To define a new C indentation style, call the function | 1199 | To define a new C indentation style, call the function |
| @@ -1175,10 +1206,9 @@ says. | |||
| 1175 | @noindent | 1206 | @noindent |
| 1176 | Here @var{name} is the name of the new style (a string), and | 1207 | Here @var{name} is the name of the new style (a string), and |
| 1177 | @var{values} is an alist whose elements have the form | 1208 | @var{values} is an alist whose elements have the form |
| 1178 | @code{(@var{variable} . @var{value})}. The variables you specify should | 1209 | @code{(@var{variable} . @var{value})}. The variables you specify |
| 1179 | be among those documented in @ref{Variables for C Indent}. | 1210 | should be among those documented in @ref{Variables for C Indent}. If |
| 1180 | 1211 | @var{use-now} is non-@code{nil}, @code{c-add-style} selects the new | |
| 1181 | If @var{use-now} is non-@code{nil}, @code{c-add-style} selects the new | ||
| 1182 | style after defining it. | 1212 | style after defining it. |
| 1183 | 1213 | ||
| 1184 | @node Matching | 1214 | @node Matching |
| @@ -1209,14 +1239,17 @@ correct matches are specified in the syntax table. | |||
| 1209 | Three variables control parenthesis match display. | 1239 | Three variables control parenthesis match display. |
| 1210 | @code{blink-matching-paren} turns the feature on or off; @code{nil} | 1240 | @code{blink-matching-paren} turns the feature on or off; @code{nil} |
| 1211 | turns it off, but the default is @code{t} to turn match display on. | 1241 | turns it off, but the default is @code{t} to turn match display on. |
| 1212 | @code{blink-matching-delay} says how many seconds to wait after moving | 1242 | |
| 1213 | the cursor to the matching open parenthesis, before moving it back; the | 1243 | @code{blink-matching-delay} says how many seconds to leave the |
| 1214 | default is 1, but on some systems it is useful to specify a fraction of | 1244 | cursor on the matching open parenthesis, before bringing it back to |
| 1215 | a second. @code{blink-matching-paren-distance} specifies how many | 1245 | the real location of point; the default is 1, but on some systems it |
| 1216 | characters back to search to find the matching opening delimiter. If | 1246 | is useful to specify a fraction of a second. |
| 1217 | the match is not found in that far, scanning stops, and nothing is | 1247 | |
| 1218 | displayed. This is to prevent scanning for the matching delimiter from | 1248 | @code{blink-matching-paren-distance} specifies how many characters |
| 1219 | wasting lots of time when there is no match. The default is 25600. | 1249 | back to search to find the matching opening delimiter. If the match |
| 1250 | is not found in that far, scanning stops, and nothing is displayed. | ||
| 1251 | This is to prevent scanning for the matching delimiter from wasting | ||
| 1252 | lots of time when there is no match. The default is 25600. | ||
| 1220 | 1253 | ||
| 1221 | @cindex Show Paren mode | 1254 | @cindex Show Paren mode |
| 1222 | @cindex highlighting matching parentheses | 1255 | @cindex highlighting matching parentheses |
| @@ -1598,8 +1631,7 @@ Non-@code{nil} says that @kbd{hs-hide-all} should hide comments too. | |||
| 1598 | @item hs-isearch-open | 1631 | @item hs-isearch-open |
| 1599 | Specifies what kind of hidden blocks to open in Isearch mode. | 1632 | Specifies what kind of hidden blocks to open in Isearch mode. |
| 1600 | @item hs-special-modes-alist | 1633 | @item hs-special-modes-alist |
| 1601 | Specifies | 1634 | Specifies how to initialize Hideshow variables for different modes. |
| 1602 | Initializes Hideshow variables for different modes. | ||
| 1603 | @end table | 1635 | @end table |
| 1604 | 1636 | ||
| 1605 | @node Glasses | 1637 | @node Glasses |
| @@ -1706,7 +1738,7 @@ for ``w/o (without) man,'' since it doesn't use the @code{man} | |||
| 1706 | program.}. Unlike @kbd{M-x man}, it does not run any external | 1738 | program.}. Unlike @kbd{M-x man}, it does not run any external |
| 1707 | programs to format and display the man pages; instead it does the job | 1739 | programs to format and display the man pages; instead it does the job |
| 1708 | in Emacs Lisp, so it works on systems such as MS-Windows, where the | 1740 | in Emacs Lisp, so it works on systems such as MS-Windows, where the |
| 1709 | @code{man} program and other the programs it needs are not readily | 1741 | @code{man} program and the other programs it needs are not readily |
| 1710 | available. @kbd{M-x woman} prompts for a name of a manual page, and | 1742 | available. @kbd{M-x woman} prompts for a name of a manual page, and |
| 1711 | provides completion based on the list of manual pages that are | 1743 | provides completion based on the list of manual pages that are |
| 1712 | installed on your machine; the list of available manual pages is | 1744 | installed on your machine; the list of available manual pages is |
| @@ -1789,13 +1821,13 @@ one of its parent directories. A single @file{ChangeLog} file can | |||
| 1789 | record changes for all the files in its directory and all its | 1821 | record changes for all the files in its directory and all its |
| 1790 | subdirectories. | 1822 | subdirectories. |
| 1791 | 1823 | ||
| 1792 | A change log entry starts with a header line that contains your name, | 1824 | A change log entry starts with a header line that contains the |
| 1793 | your email address (taken from the variable @code{user-mail-address}), | 1825 | current date, your name, and your email address (taken from the |
| 1794 | and the current date and time. Aside from these header lines, every | 1826 | variable @code{user-mail-address}). Aside from these header lines, |
| 1795 | line in the change log starts with a space or a tab. The bulk of the | 1827 | every line in the change log starts with a space or a tab. The bulk |
| 1796 | entry consists of @dfn{items}, each of which starts with a line starting | 1828 | of the entry consists of @dfn{items}, each of which starts with a line |
| 1797 | with whitespace and a star. Here are two entries, both dated in May | 1829 | starting with whitespace and a star. Here are two entries, both dated |
| 1798 | 1993, each with two items: | 1830 | in May 1993, each with two items: |
| 1799 | 1831 | ||
| 1800 | @iftex | 1832 | @iftex |
| 1801 | @medbreak | 1833 | @medbreak |
| @@ -1836,7 +1868,7 @@ rather than starting a new entry. | |||
| 1836 | @vindex change-log-version-number-regexp-list | 1868 | @vindex change-log-version-number-regexp-list |
| 1837 | @cindex file version in change log entries | 1869 | @cindex file version in change log entries |
| 1838 | If the value of the variable @code{change-log-version-info-enabled} | 1870 | If the value of the variable @code{change-log-version-info-enabled} |
| 1839 | is non-@code{nil}, @kbd{C-x 4 a} ads the file's version number to the | 1871 | is non-@code{nil}, @kbd{C-x 4 a} adds the file's version number to the |
| 1840 | change log entry. It finds the version number by searching the first | 1872 | change log entry. It finds the version number by searching the first |
| 1841 | ten percent of the file, using regular expressions from the variable | 1873 | ten percent of the file, using regular expressions from the variable |
| 1842 | @code{change-log-version-number-regexp-list}. | 1874 | @code{change-log-version-number-regexp-list}. |
diff --git a/src/ChangeLog b/src/ChangeLog index dcaae37ad7e..f9146af8e94 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2001-06-23 Richard M. Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * minibuf.c (Fcompleting_read): Doc fix. | ||
| 4 | |||
| 1 | 2001-06-19 Gerd Moellmann <gerd@gnu.org> | 5 | 2001-06-19 Gerd Moellmann <gerd@gnu.org> |
| 2 | 6 | ||
| 3 | * composite.c (Ffind_composition_internal): Accept ZV | 7 | * composite.c (Ffind_composition_internal): Accept ZV |