aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2001-06-23 16:19:18 +0000
committerRichard M. Stallman2001-06-23 16:19:18 +0000
commitf772775cb8c49d5142bddbb27d451ab33d5034f3 (patch)
treedb264409b3b856ff45d9190a81f0551f8bd6596b
parent0bae67ad54d7060b54cce77a083a3b4397a6410e (diff)
downloademacs-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.texi130
-rw-r--r--src/ChangeLog4
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}).
351Put region around whole current or following defun (@code{mark-defun}). 351Put 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
363are @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
365positive numeric argument, each repetition moves to the next defun in
366the 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
370the same place that @kbd{C-M-e} with argument @var{n} would move to;
371the end of this defun is not usually exactly the same place as the
372beginning of the following defun. (Typically whitespace or comments
373separate them.) Likewise, @kbd{C-M-e} with a negative argument moves
374back to an end of a defun, which is not quite the same as @kbd{C-M-a}
375with 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
427the correct indentation as determined from the previous lines. The 451the correct indentation as determined from the previous lines. The
428function that @key{TAB} runs depends on the major mode; it is 452function that @key{TAB} runs depends on the major mode; it is
@@ -445,12 +469,12 @@ the characters around it.
445followed by a @key{TAB}. @kbd{C-j} at the end of a line creates a 469followed by a @key{TAB}. @kbd{C-j} at the end of a line creates a
446blank line and then gives it the appropriate indentation. 470blank 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
449parenthetical grouping each under the preceding one; therefore, if you 473each under the preceding line (or the text after the parenthesis).
450alter one line's indentation to be nonstandard, the lines below will 474Therefore, if you manually give one of these lines a nonstandard
451tend to follow it. This behavior is convenient in cases where you have 475indentation, the lines below will tend to follow it. This behavior is
452overridden the standard result of @key{TAB} because you find it 476convenient in cases where you have overridden the standard result of
453unaesthetic 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
456at the left margin is assumed by Emacs (including the indentation routines) 480at 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
1133Emacs comes with several predefined indentation styles for C and related 1157that can be used in C mode and the related modes. Emacs comes with
1134modes, including @code{gnu}, @code{k&r}, @code{bsd}, @code{stroustrup}, 1158several 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
1162language, but any of them can be used with any of the languages
1163supported 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
1140Specify a style name as an argument (case is not significant in C style 1167c-set-style}. Specify a style name as an argument (case is not
1141names). The chosen style only affects newly visited buffers, not those 1168significant in C style names). This command affects the current
1142you are already editing; to reindent an existing buffer, switch to that 1169buffer only, but it affects only future invocations of the indentation
1143buffer and type @kbd{C-x h C-M-\}. 1170command; it does not change the indentation of the code in the buffer.
1171To 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
1147style for various major modes. Its value should be an alist, in which 1175default style for various major modes. Its value should be an alist,
1148each element specifies one major mode and which indentation style to use 1176in which each element specifies one major mode and which indentation
1149for it. For example, 1177style 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
1157specifies an explicit choice for Java mode, and the default @samp{gnu} 1185specifies an explicit choice for Java mode, and the default @samp{gnu}
1158style for the other C-like modes. 1186style for the other C-like modes. This variable takes effect when you
1159 1187switch 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 1188default style for Java mode, you can make it take effect in an
1161Project; it is the default, so as to encourage the indentation we 1189existing Java mode buffer by typing @kbd{M-x java-mode} there.
1162recommend. However, if you make changes in variables such as 1190
1191 The @code{gnu} style specifies the formatting recommended by the GNU
1192Project for C; it is the default, so as to encourage use of our
1193recommended 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
1165says. 1196specifies.
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
1176Here @var{name} is the name of the new style (a string), and 1207Here @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
1179be among those documented in @ref{Variables for C Indent}. 1210should 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
1182style after defining it. 1212style 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}
1211turns it off, but the default is @code{t} to turn match display on. 1241turns 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
1213the cursor to the matching open parenthesis, before moving it back; the 1243 @code{blink-matching-delay} says how many seconds to leave the
1214default is 1, but on some systems it is useful to specify a fraction of 1244cursor on the matching open parenthesis, before bringing it back to
1215a second. @code{blink-matching-paren-distance} specifies how many 1245the real location of point; the default is 1, but on some systems it
1216characters back to search to find the matching opening delimiter. If 1246is useful to specify a fraction of a second.
1217the match is not found in that far, scanning stops, and nothing is 1247
1218displayed. This is to prevent scanning for the matching delimiter from 1248 @code{blink-matching-paren-distance} specifies how many characters
1219wasting lots of time when there is no match. The default is 25600. 1249back to search to find the matching opening delimiter. If the match
1250is not found in that far, scanning stops, and nothing is displayed.
1251This is to prevent scanning for the matching delimiter from wasting
1252lots 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
1599Specifies what kind of hidden blocks to open in Isearch mode. 1632Specifies what kind of hidden blocks to open in Isearch mode.
1600@item hs-special-modes-alist 1633@item hs-special-modes-alist
1601Specifies 1634Specifies how to initialize Hideshow variables for different modes.
1602Initializes 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}
1706program.}. Unlike @kbd{M-x man}, it does not run any external 1738program.}. Unlike @kbd{M-x man}, it does not run any external
1707programs to format and display the man pages; instead it does the job 1739programs to format and display the man pages; instead it does the job
1708in Emacs Lisp, so it works on systems such as MS-Windows, where the 1740in 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
1710available. @kbd{M-x woman} prompts for a name of a manual page, and 1742available. @kbd{M-x woman} prompts for a name of a manual page, and
1711provides completion based on the list of manual pages that are 1743provides completion based on the list of manual pages that are
1712installed on your machine; the list of available manual pages is 1744installed 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
1789record changes for all the files in its directory and all its 1821record changes for all the files in its directory and all its
1790subdirectories. 1822subdirectories.
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
1793your email address (taken from the variable @code{user-mail-address}), 1825current date, your name, and your email address (taken from the
1794and the current date and time. Aside from these header lines, every 1826variable @code{user-mail-address}). Aside from these header lines,
1795line in the change log starts with a space or a tab. The bulk of the 1827every line in the change log starts with a space or a tab. The bulk
1796entry consists of @dfn{items}, each of which starts with a line starting 1828of the entry consists of @dfn{items}, each of which starts with a line
1797with whitespace and a star. Here are two entries, both dated in May 1829starting with whitespace and a star. Here are two entries, both dated
17981993, each with two items: 1830in 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}
1839is non-@code{nil}, @kbd{C-x 4 a} ads the file's version number to the 1871is non-@code{nil}, @kbd{C-x 4 a} adds the file's version number to the
1840change log entry. It finds the version number by searching the first 1872change log entry. It finds the version number by searching the first
1841ten percent of the file, using regular expressions from the variable 1873ten 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 @@
12001-06-23 Richard M. Stallman <rms@gnu.org>
2
3 * minibuf.c (Fcompleting_read): Doc fix.
4
12001-06-19 Gerd Moellmann <gerd@gnu.org> 52001-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