diff options
| author | Richard M. Stallman | 2005-12-20 02:49:17 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-12-20 02:49:17 +0000 |
| commit | f5eb910a1a73918fd0ee1f3aed0042fdb8f39f8e (patch) | |
| tree | 3ba7492eaaad98244d59c47e0592351db5258d32 | |
| parent | 2b8fa3be3889eac9c6b64d2b9ecf83b792333a3c (diff) | |
| download | emacs-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/ChangeLog | 6 | ||||
| -rw-r--r-- | man/programs.texi | 163 |
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 @@ | |||
| 1 | 2005-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 | |||
| 1 | 2005-12-19 Luc Teirlinck <teirllm@auburn.edu> | 7 | 2005-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: | |||
| 166 | If this user option is set to @code{t} (the default), opening | 166 | If this user option is set to @code{t} (the default), opening |
| 167 | parentheses or braces at column zero always start defuns. When it's | 167 | parentheses 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 |
| 169 | outermost level. | 169 | outermost 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 | ||
| 172 | In 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 |
| 174 | unless it is a defun start}. For instance, never put an | 176 | unless it is a defun start}. For instance, never put an |
| 175 | open-parenthesis at the left margin in a Lisp file unless it is the | 177 | open-parenthesis at the left margin in a Lisp file unless it is the |
| @@ -198,11 +200,6 @@ starting a defun. Here's an example: | |||
| 198 | highlights confusing opening delimiters (those that ought to be | 200 | highlights confusing opening delimiters (those that ought to be |
| 199 | quoted) in bold red. | 201 | quoted) 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 | ||
| 204 | some 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 |
| 207 | upward a level of parentheses or braces until there were no more | 204 | upward a level of parentheses or braces until there were no more |
| 208 | levels to go up. This always required scanning all the way back to | 205 | levels 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 | |||
| 211 | at the left margin is the start of a defun. This heuristic is nearly | 208 | at the left margin is the start of a defun. This heuristic is nearly |
| 212 | always right, and avoids the need to scan back to the beginning of the | 209 | always right, and avoids the need to scan back to the beginning of the |
| 213 | buffer. However, now that modern computers are so powerful, this | 210 | buffer. However, now that modern computers are so powerful, this |
| 214 | scanning is rarely slow enough to annoy, so we've given you a way to | 211 | scanning is rarely slow enough to annoy, so we've provided a way to |
| 215 | disable the heuristic. | 212 | disable 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, |
| 987 | you can use the command @kbd{C-M-j} or @kbd{M-j} | 984 | you 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} |
| 989 | typing, 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 |
| 990 | indented under the old one. Or, if the language syntax permits | 987 | line within the comment. Otherwise it closes the comment and starts a |
| 991 | comments to extend beyond ends of lines, it may instead continue the | 988 | new comment on a new line. When Auto Fill mode is on, going past the |
| 992 | existing comment on the new blank line---this is controlled by the | 989 | fill column while typing a comment causes the comment to be continued |
| 993 | setting of @code{comment-multi-line} (@pxref{Options for Comments}). | 990 | in just this fashion. |
| 994 | If point is not at the end of the line when you type the command, the | ||
| 995 | text on the rest of the line becomes part of the new comment line. | ||
| 996 | When Auto Fill mode is on, going past the fill column while typing a | ||
| 997 | comment 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. | |||
| 1568 | reindent the current line, and optionally also insert newlines. The | 1561 | reindent 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 |
| 1574 | chaotically indented code. If you are new to CC Mode, you might find | 1567 | chaotically 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 | |||
| 1599 | argument is positive, and off if it is negative. | 1592 | argument 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 |
| 1603 | Mode Manual}) configures the exact circumstances in which Emacs | 1596 | which Emacs inserts auto-newlines. You can also configure this |
| 1604 | inserts auto-newlines, but you can configure this directly instead. | 1597 | directly. @xref{Custom Auto-newlines,,, ccmode, The CC Mode Manual}. |
| 1605 | Full details are at @ref{Custom Auto-newlines,,, ccmode, The CC Mode | ||
| 1606 | Manual}, but there is a short summary below. | ||
| 1607 | |||
| 1608 | The colon character is electric because that is appropriate for a | ||
| 1609 | single colon. But when you want to insert a double colon in C++, the | ||
| 1610 | electric behavior of colon is inconvenient. You can insert a double | ||
| 1611 | colon 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 | ||
| 1624 | Insert a double colon scope operator at point, without reindenting the | ||
| 1625 | line 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 | ||
| 1630 | beginning of a preprocessor directive. This happens when the value of | ||
| 1631 | @code{c-electric-pound-behavior} is @code{(alignleft)}. You can turn | ||
| 1632 | this 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 | ||
| 1637 | newlines before and after inserted braces. It is an association list | ||
| 1638 | with 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 | ||
| 1644 | brace 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 | ||
| 1646 | to determine where newlines are inserted: either before the brace, | ||
| 1647 | after, or both. If not found, the default is to insert a newline both | ||
| 1648 | before and after braces. | ||
| 1649 | |||
| 1650 | @vindex c-hanging-colons-alist | ||
| 1651 | The variable @code{c-hanging-colons-alist} controls the insertion of | ||
| 1652 | newlines before and after inserted colons. It is an association list | ||
| 1653 | with elements of the following form: @code{(@var{syntactic-symbol} | ||
| 1654 | . @var{nl-list})}. The list @var{nl-list} may contain either of the | ||
| 1655 | symbols @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 | ||
| 1658 | up in this list, and if found, the @var{nl-list} is used to determine | ||
| 1659 | where newlines are inserted: either before the brace, after, or both. | ||
| 1660 | If the syntactic symbol is not found in this list, no newlines are | ||
| 1661 | inserted. | ||
| 1662 | |||
| 1663 | @vindex c-cleanup-list | ||
| 1664 | Electric characters can also delete newlines automatically when the | ||
| 1665 | auto-newline feature is enabled. This feature makes auto-newline more | ||
| 1666 | acceptable, by deleting the newlines in the most common cases where | ||
| 1667 | you do not want them. Emacs can recognize several cases in which | ||
| 1668 | deleting a newline might be desirable; by setting the variable | ||
| 1669 | @code{c-cleanup-list}, you can specify @emph{which} of these cases | ||
| 1670 | that should happen. @xref{Clean-ups,,, ccmode, The CC Mode Manual}. | ||
| 1671 | The variable's value is a list of symbols, each describing one case | ||
| 1672 | for possible deletion of a newline. Here is a summary of the | ||
| 1673 | meaningful symbols and their meanings: | ||
| 1674 | |||
| 1675 | @table @code | ||
| 1676 | @item brace-catch-brace | ||
| 1677 | Clean up @samp{@} catch (@var{condition}) @{} constructs by placing the | ||
| 1678 | entire construct on a single line. The clean-up occurs when you type | ||
| 1679 | the @samp{@{}, if there is nothing between the braces aside from | ||
| 1680 | @code{catch} and @var{condition}. | ||
| 1681 | |||
| 1682 | @item brace-else-brace | ||
| 1683 | Clean up @samp{@} else @{} constructs by placing the entire construct on | ||
| 1684 | a single line. The clean-up occurs when you type the @samp{@{} after | ||
| 1685 | the @code{else}, but only if there is nothing but white space between | ||
| 1686 | the braces and the @code{else}. | ||
| 1687 | |||
| 1688 | @item brace-elseif-brace | ||
| 1689 | Clean up @samp{@} else if (@dots{}) @{} constructs by placing the entire | ||
| 1690 | construct 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 | ||
| 1695 | Clean up empty defun braces by placing the braces on the same | ||
| 1696 | line. Clean-up occurs when you type the closing brace. | ||
| 1697 | |||
| 1698 | @item defun-close-semi | ||
| 1699 | Clean up the semicolon after a @code{struct} or similar type | ||
| 1700 | declaration, by placing the semicolon on the same line as the closing | ||
| 1701 | brace. Clean-up occurs when you type the semicolon. | ||
| 1702 | |||
| 1703 | @item list-close-comma | ||
| 1704 | Clean up commas following braces in array and aggregate | ||
| 1705 | initializers. Clean-up occurs when you type the comma. | ||
| 1706 | |||
| 1707 | @item one-line-defun | ||
| 1708 | Remove space and newlines from a defun if this would leave it short | ||
| 1709 | enough to fit on a single line. This is useful for AWK pattern/action | ||
| 1710 | pairs. ``Short enough'' means not longer than the value of the user | ||
| 1711 | option @code{c-max-one-liner-length}. Clean-up occurs when you type | ||
| 1712 | the closing brace. | ||
| 1713 | |||
| 1714 | @item scope-operator | ||
| 1715 | Clean up double colons which may designate a C++ scope operator, by | ||
| 1716 | placing the colons together. Clean-up occurs when you type the second | ||
| 1717 | colon, but only when the two colons are separated by nothing but | ||
| 1718 | whitespace. | ||
| 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 |
| 1779 | Enable (or disable) @dfn{subword mode} - Emacs's word commands then | 1657 | Enable (or disable) @dfn{subword mode}. In subword mode, Emacs's word |
| 1780 | recognize upper case letters in @samp{StudlyCapsIdentifiers} as word | 1658 | commands then recognize upper case letters in |
| 1781 | boundaries. This is indicated by the flag @samp{/w} on the mode line | 1659 | @samp{StudlyCapsIdentifiers} as word boundaries. This is indicated by |
| 1782 | after the mode name (e.g. @samp{C/law}). You can even use @kbd{M-x | 1660 | the flag @samp{/w} on the mode line after the mode name |
| 1783 | c-subword-mode} in non-CC Mode buffers. | 1661 | (e.g. @samp{C/law}). You can even use @kbd{M-x c-subword-mode} in |
| 1662 | non-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 |