aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2005-12-20 02:49:17 +0000
committerRichard M. Stallman2005-12-20 02:49:17 +0000
commitf5eb910a1a73918fd0ee1f3aed0042fdb8f39f8e (patch)
tree3ba7492eaaad98244d59c47e0592351db5258d32
parent2b8fa3be3889eac9c6b64d2b9ecf83b792333a3c (diff)
downloademacs-f5eb910a1a73918fd0ee1f3aed0042fdb8f39f8e.tar.gz
emacs-f5eb910a1a73918fd0ee1f3aed0042fdb8f39f8e.zip
(Electric C): Delete the info about newline control.
(Other C Commands): Minor cleanup. (Left Margin Paren): Minor cleanup.
-rw-r--r--man/ChangeLog6
-rw-r--r--man/programs.texi163
2 files changed, 27 insertions, 142 deletions
diff --git a/man/ChangeLog b/man/ChangeLog
index 60b4355ef39..3a8a184564a 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,9 @@
12005-12-19 Richard M. Stallman <rms@gnu.org>
2
3 * programs.texi (Electric C): Delete the info about newline control.
4 (Other C Commands): Minor cleanup.
5 (Left Margin Paren): Minor cleanup.
6
12005-12-19 Luc Teirlinck <teirllm@auburn.edu> 72005-12-19 Luc Teirlinck <teirllm@auburn.edu>
2 8
3 * custom.texi (Easy Customization): Add "Browsing Custom" to menu. 9 * custom.texi (Easy Customization): Add "Browsing Custom" to menu.
diff --git a/man/programs.texi b/man/programs.texi
index a80d3bad08a..e1806488150 100644
--- a/man/programs.texi
+++ b/man/programs.texi
@@ -166,10 +166,12 @@ override this default by setting this user option:
166If this user option is set to @code{t} (the default), opening 166If this user option is set to @code{t} (the default), opening
167parentheses or braces at column zero always start defuns. When it's 167parentheses or braces at column zero always start defuns. When it's
168@code{nil}, defuns are found by searching for parens or braces at the 168@code{nil}, defuns are found by searching for parens or braces at the
169outermost level. 169outermost level. Some major modes, including C and related modes, set
170@code{open-paren-in-column-0-is-defun-start} buffer-locally to
171@code{nil}
170@end defvar 172@end defvar
171 173
172In buffers where @code{open-paren-in-column-0-is-defun-start} is 174 In modes where @code{open-paren-in-column-0-is-defun-start} is
173@code{t}, @strong{don't put an opening delimiter at the left margin 175@code{t}, @strong{don't put an opening delimiter at the left margin
174unless it is a defun start}. For instance, never put an 176unless it is a defun start}. For instance, never put an
175open-parenthesis at the left margin in a Lisp file unless it is the 177open-parenthesis at the left margin in a Lisp file unless it is the
@@ -198,11 +200,6 @@ starting a defun. Here's an example:
198highlights confusing opening delimiters (those that ought to be 200highlights confusing opening delimiters (those that ought to be
199quoted) in bold red. 201quoted) in bold red.
200 202
201 Some major modes, including C and related modes, set
202@code{open-paren-in-column-0-is-defun-start} buffer-locally to
203@code{nil}, thus freeing you from all these restrictions. This makes
204some commands run more slowly, though.
205
206 In the earliest days, the original Emacs found defuns by moving 203 In the earliest days, the original Emacs found defuns by moving
207upward a level of parentheses or braces until there were no more 204upward a level of parentheses or braces until there were no more
208levels to go up. This always required scanning all the way back to 205levels to go up. This always required scanning all the way back to
@@ -211,7 +208,7 @@ the operation, we changed Emacs to assume that any opening delimiter
211at the left margin is the start of a defun. This heuristic is nearly 208at the left margin is the start of a defun. This heuristic is nearly
212always right, and avoids the need to scan back to the beginning of the 209always right, and avoids the need to scan back to the beginning of the
213buffer. However, now that modern computers are so powerful, this 210buffer. However, now that modern computers are so powerful, this
214scanning is rarely slow enough to annoy, so we've given you a way to 211scanning is rarely slow enough to annoy, so we've provided a way to
215disable the heuristic. 212disable the heuristic.
216 213
217@node Moving by Defuns 214@node Moving by Defuns
@@ -985,16 +982,12 @@ the brace rather than at @code{comment-column}. For full details see
985 982
986 If you are typing a comment and wish to continue it on another line, 983 If you are typing a comment and wish to continue it on another line,
987you can use the command @kbd{C-M-j} or @kbd{M-j} 984you can use the command @kbd{C-M-j} or @kbd{M-j}
988(@code{comment-indent-new-line}). This terminates the comment you are 985(@code{comment-indent-new-line}). If @code{comment-multi-line}
989typing, creates a new blank line afterward, and begins a new comment 986(@pxref{Options for Comments}) is non-@code{nil}, it moves to a new
990indented under the old one. Or, if the language syntax permits 987line within the comment. Otherwise it closes the comment and starts a
991comments to extend beyond ends of lines, it may instead continue the 988new comment on a new line. When Auto Fill mode is on, going past the
992existing comment on the new blank line---this is controlled by the 989fill column while typing a comment causes the comment to be continued
993setting of @code{comment-multi-line} (@pxref{Options for Comments}). 990in just this fashion.
994If point is not at the end of the line when you type the command, the
995text on the rest of the line becomes part of the new comment line.
996When Auto Fill mode is on, going past the fill column while typing a
997comment causes the comment to be continued in just this fashion.
998 991
999@kindex C-c C-c (C mode) 992@kindex C-c C-c (C mode)
1000@findex comment-region 993@findex comment-region
@@ -1568,7 +1561,7 @@ With prefix argument @var{n}, move @var{n} times.
1568reindent the current line, and optionally also insert newlines. The 1561reindent the current line, and optionally also insert newlines. The
1569``electric'' characters are @kbd{@{}, @kbd{@}}, @kbd{:}, @kbd{#}, 1562``electric'' characters are @kbd{@{}, @kbd{@}}, @kbd{:}, @kbd{#},
1570@kbd{;}, @kbd{,}, @kbd{<}, @kbd{>}, @kbd{/}, @kbd{*}, @kbd{(}, and 1563@kbd{;}, @kbd{,}, @kbd{<}, @kbd{>}, @kbd{/}, @kbd{*}, @kbd{(}, and
1571@kbd{)}. @xref{Electric Keys,,, ccmode, The CC Mode Manual}. 1564@kbd{)}.
1572 1565
1573 You might find electric indentation inconvenient if you are editing 1566 You might find electric indentation inconvenient if you are editing
1574chaotically indented code. If you are new to CC Mode, you might find 1567chaotically indented code. If you are new to CC Mode, you might find
@@ -1599,124 +1592,9 @@ prefix argument, this command turns the auto-newline feature on if the
1599argument is positive, and off if it is negative. 1592argument is positive, and off if it is negative.
1600@end table 1593@end table
1601 1594
1602 Usually the CC Mode style system (@pxref{Styles,,, ccmode, The CC 1595 Usually the CC Mode style configures the exact circumstances in
1603Mode Manual}) configures the exact circumstances in which Emacs 1596which Emacs inserts auto-newlines. You can also configure this
1604inserts auto-newlines, but you can configure this directly instead. 1597directly. @xref{Custom Auto-newlines,,, ccmode, The CC Mode Manual}.
1605Full details are at @ref{Custom Auto-newlines,,, ccmode, The CC Mode
1606Manual}, but there is a short summary below.
1607
1608 The colon character is electric because that is appropriate for a
1609single colon. But when you want to insert a double colon in C++, the
1610electric behavior of colon is inconvenient. You can insert a double
1611colon with no reindentation or newlines by typing @kbd{C-c :}:
1612
1613@table @kbd
1614@item C-c :
1615@ifinfo
1616@c This uses ``colon'' instead of a literal `:' because Info cannot
1617@c cope with a `:' in a menu
1618@kindex C-c @key{colon} @r{(C mode)}
1619@end ifinfo
1620@ifnotinfo
1621@kindex C-c : @r{(C mode)}
1622@end ifnotinfo
1623@findex c-scope-operator
1624Insert a double colon scope operator at point, without reindenting the
1625line or adding any newlines (@code{c-scope-operator}).
1626@end table
1627
1628@vindex c-electric-pound-behavior
1629 The electric @kbd{#} key reindents the line if it appears to be the
1630beginning of a preprocessor directive. This happens when the value of
1631@code{c-electric-pound-behavior} is @code{(alignleft)}. You can turn
1632this feature off by setting @code{c-electric-pound-behavior} to
1633@code{nil}.
1634
1635@vindex c-hanging-braces-alist
1636 The variable @code{c-hanging-braces-alist} controls the insertion of
1637newlines before and after inserted braces. It is an association list
1638with elements of the following form: @code{(@var{syntactic-symbol}
1639. @var{nl-list})}. Most of the syntactic symbols that appear in
1640@code{c-offsets-alist} are meaningful here as well.
1641
1642 The list @var{nl-list} may contain either of the symbols
1643@code{before} or @code{after}, or both; or it may be @code{nil}. When a
1644brace is inserted, the syntactic context it defines is looked up in
1645@code{c-hanging-braces-alist}; if it is found, the @var{nl-list} is used
1646to determine where newlines are inserted: either before the brace,
1647after, or both. If not found, the default is to insert a newline both
1648before and after braces.
1649
1650@vindex c-hanging-colons-alist
1651 The variable @code{c-hanging-colons-alist} controls the insertion of
1652newlines before and after inserted colons. It is an association list
1653with elements of the following form: @code{(@var{syntactic-symbol}
1654. @var{nl-list})}. The list @var{nl-list} may contain either of the
1655symbols @code{before} or @code{after}, or both; or it may be @code{nil}.
1656
1657 When a colon is inserted, the syntactic symbol it defines is looked
1658up in this list, and if found, the @var{nl-list} is used to determine
1659where newlines are inserted: either before the brace, after, or both.
1660If the syntactic symbol is not found in this list, no newlines are
1661inserted.
1662
1663@vindex c-cleanup-list
1664 Electric characters can also delete newlines automatically when the
1665auto-newline feature is enabled. This feature makes auto-newline more
1666acceptable, by deleting the newlines in the most common cases where
1667you do not want them. Emacs can recognize several cases in which
1668deleting a newline might be desirable; by setting the variable
1669@code{c-cleanup-list}, you can specify @emph{which} of these cases
1670that should happen. @xref{Clean-ups,,, ccmode, The CC Mode Manual}.
1671The variable's value is a list of symbols, each describing one case
1672for possible deletion of a newline. Here is a summary of the
1673meaningful symbols and their meanings:
1674
1675@table @code
1676@item brace-catch-brace
1677Clean up @samp{@} catch (@var{condition}) @{} constructs by placing the
1678entire construct on a single line. The clean-up occurs when you type
1679the @samp{@{}, if there is nothing between the braces aside from
1680@code{catch} and @var{condition}.
1681
1682@item brace-else-brace
1683Clean up @samp{@} else @{} constructs by placing the entire construct on
1684a single line. The clean-up occurs when you type the @samp{@{} after
1685the @code{else}, but only if there is nothing but white space between
1686the braces and the @code{else}.
1687
1688@item brace-elseif-brace
1689Clean up @samp{@} else if (@dots{}) @{} constructs by placing the entire
1690construct on a single line. The clean-up occurs when you type the
1691@samp{@{}, if there is nothing but white space between the @samp{@}} and
1692@samp{@{} aside from the keywords and the @code{if}-condition.
1693
1694@item empty-defun-braces
1695Clean up empty defun braces by placing the braces on the same
1696line. Clean-up occurs when you type the closing brace.
1697
1698@item defun-close-semi
1699Clean up the semicolon after a @code{struct} or similar type
1700declaration, by placing the semicolon on the same line as the closing
1701brace. Clean-up occurs when you type the semicolon.
1702
1703@item list-close-comma
1704Clean up commas following braces in array and aggregate
1705initializers. Clean-up occurs when you type the comma.
1706
1707@item one-line-defun
1708Remove space and newlines from a defun if this would leave it short
1709enough to fit on a single line. This is useful for AWK pattern/action
1710pairs. ``Short enough'' means not longer than the value of the user
1711option @code{c-max-one-liner-length}. Clean-up occurs when you type
1712the closing brace.
1713
1714@item scope-operator
1715Clean up double colons which may designate a C++ scope operator, by
1716placing the colons together. Clean-up occurs when you type the second
1717colon, but only when the two colons are separated by nothing but
1718whitespace.
1719@end table
1720 1598
1721@node Hungry Delete 1599@node Hungry Delete
1722@subsection Hungry Delete Feature in C 1600@subsection Hungry Delete Feature in C
@@ -1776,11 +1654,12 @@ hungry-delete feature is enabled.
1776@item C-c C-w 1654@item C-c C-w
1777@itemx M-x c-subword-mode 1655@itemx M-x c-subword-mode
1778@findex c-subword-mode 1656@findex c-subword-mode
1779Enable (or disable) @dfn{subword mode} - Emacs's word commands then 1657Enable (or disable) @dfn{subword mode}. In subword mode, Emacs's word
1780recognize upper case letters in @samp{StudlyCapsIdentifiers} as word 1658commands then recognize upper case letters in
1781boundaries. This is indicated by the flag @samp{/w} on the mode line 1659@samp{StudlyCapsIdentifiers} as word boundaries. This is indicated by
1782after the mode name (e.g. @samp{C/law}). You can even use @kbd{M-x 1660the flag @samp{/w} on the mode line after the mode name
1783c-subword-mode} in non-CC Mode buffers. 1661(e.g. @samp{C/law}). You can even use @kbd{M-x c-subword-mode} in
1662non-CC Mode buffers.
1784 1663
1785@item M-x c-context-line-break 1664@item M-x c-context-line-break
1786@findex c-context-line-break 1665@findex c-context-line-break