aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mackenzie2006-02-24 12:20:45 +0000
committerAlan Mackenzie2006-02-24 12:20:45 +0000
commit0d566910540fa519c48f90455bdecd4565cea948 (patch)
tree93b136b56e067f585d82f86583d04ee87b8ff7c7
parent18f34551f4003fc3f18d85b8056d462fba8a7770 (diff)
downloademacs-0d566910540fa519c48f90455bdecd4565cea948.tar.gz
emacs-0d566910540fa519c48f90455bdecd4565cea948.zip
(Hungry WS Deletion): Rename c-hungry-backspace to
c-hungry-delete-backwards, at the request of RMS. Leave the old name as an alias. (Movement Commands): Correct the definition of c-beginning-of-defun, to include the function header within the defun. (Comment Commands): State that C-u M-; kills any existing comment. (Electric Keys): Add a justification for electric indentation. (Hungry WS Deletion): Clear up the names and complications of the BACKSPACE and DELETE keys. Correct two typos.
-rw-r--r--man/cc-mode.texi103
1 files changed, 55 insertions, 48 deletions
diff --git a/man/cc-mode.texi b/man/cc-mode.texi
index fcc3c59c1f6..80aff8b1604 100644
--- a/man/cc-mode.texi
+++ b/man/cc-mode.texi
@@ -208,9 +208,9 @@ license to the document, as described in section 6 of the license.
208@vskip 0pt plus 1filll 208@vskip 0pt plus 1filll
209@insertcopying 209@insertcopying
210 210
211This manual was generated from $Revision: 1.34 $ of $RCSfile: cc-mode.texi,v $, which can be 211This manual was generated from $Revision: 1.35 $ of $RCSfile: cc-mode.texi,v $, which can be
212downloaded from 212downloaded from
213@url{http://cvs.sf.net/viewcvs.py/cc-mode/cc-mode/cc-mode.texi}. 213@url{http://cvs.savannah.gnu.org/viewcvs/emacs/emacs/man/cc-mode.texi}.
214@end titlepage 214@end titlepage
215 215
216@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 216@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -447,7 +447,7 @@ depending on your needs. It describes the @ccmode{} style system and
447lists the standard styles that @ccmode{} supplies. 447lists the standard styles that @ccmode{} supplies.
448 448
449@item 449@item
450The next few chapters, describe in detail how to customize the various 450The next few chapters describe in detail how to customize the various
451features of @ccmode{}. 451features of @ccmode{}.
452 452
453@item 453@item
@@ -525,7 +525,7 @@ Normally, when you type ``punctuation'' characters such as @samp{;} or
525be disconcerting until you get used to it. To disable @dfn{electric 525be disconcerting until you get used to it. To disable @dfn{electric
526indentation} in the current buffer, type @kbd{C-c C-l}. Type the same 526indentation} in the current buffer, type @kbd{C-c C-l}. Type the same
527thing to enable it again. To have electric indentation disabled by 527thing to enable it again. To have electric indentation disabled by
528default, put the following into your @file{.emacs} mode@footnote{There 528default, put the following into your @file{.emacs} file@footnote{There
529is no ``easy customization'' facility for making this change.}: 529is no ``easy customization'' facility for making this change.}:
530 530
531@example 531@example
@@ -836,8 +836,9 @@ already. Then reindent the comment according to @code{comment-column}
836(@pxref{Comments,,, xemacs, XEmacs User's Manual}) 836(@pxref{Comments,,, xemacs, XEmacs User's Manual})
837@end ifset 837@end ifset
838and the variables below. Finally, position the point after the 838and the variables below. Finally, position the point after the
839comment starter. This is a standard Emacs command, but @ccmode{} 839comment starter. @kbd{C-u M-;} kills any comment on the current line,
840enhances it a bit with two variables: 840together with any whitespace before it. This is a standard Emacs
841command, but @ccmode{} enhances it a bit with two variables:
841 842
842@defopt c-indent-comment-alist 843@defopt c-indent-comment-alist
843@vindex indent-comment-alist (c-) 844@vindex indent-comment-alist (c-)
@@ -887,12 +888,14 @@ lines.
887@findex end-of-defun (c-) 888@findex end-of-defun (c-)
888@findex beginning-of-defun 889@findex beginning-of-defun
889@findex end-of-defun 890@findex end-of-defun
890Move to the start or end of the current top-level definition, this 891Move to the start or end of the current top-level definition. This is
891being the outermost brace pair which encloses point. These functions 892the outermost brace pair which encloses point, together with the
892are analogous to the Emacs built-in commands @code{beginning-of-defun} 893function header or similar preamble which precedes the opening brace.
893and @code{end-of-defun}, except they eliminate the constraint that the 894These functions are analogous to the Emacs built-in commands
894top-level opening brace of the defun must be in column zero. See 895@code{beginning-of-defun} and @code{end-of-defun}, except they
895@ref{Defuns,,,@emacsman{}, @emacsmantitle{}}, for more information. 896eliminate the constraint that the top-level opening brace of the defun
897must be in column zero. See @ref{Defuns,,,@emacsman{},
898@emacsmantitle{}}, for more information.
896 899
897Depending on the coding style you're using, you might prefer these two 900Depending on the coding style you're using, you might prefer these two
898commands to the standard Emacs ones. If so, consider binding them to 901commands to the standard Emacs ones. If so, consider binding them to
@@ -1220,15 +1223,16 @@ turn it (or them) off.
1220 1223
1221Most punctuation keys provide @dfn{electric} behavior - as well as 1224Most punctuation keys provide @dfn{electric} behavior - as well as
1222inserting themselves they perform some other action, such as 1225inserting themselves they perform some other action, such as
1223reindenting the line. A few keywords, such as @code{else}, also 1226reindenting the line. This reindentation saves you from having to
1224trigger electric action. 1227reindent a line manually after typing, say, a @samp{@}}. A few
1228keywords, such as @code{else}, also trigger electric action.
1225 1229
1226You can inhibit the electric behaviour described here by disabling 1230You can inhibit the electric behaviour described here by disabling
1227electric minor mode (@pxref{Minor Modes}.) 1231electric minor mode (@pxref{Minor Modes}).
1228 1232
1229Common to all of them is that they only behave electrically when used 1233Common to all these keys is that they only behave electrically when
1230in normal code (as contrasted with getting typed in a string literal 1234used in normal code (as contrasted with getting typed in a string
1231or comment). Those which cause re-indentation do so only when 1235literal or comment). Those which cause re-indentation do so only when
1232@code{c-syntactic-indentation} has a non-@code{nil} value (which it 1236@code{c-syntactic-indentation} has a non-@code{nil} value (which it
1233does by default). 1237does by default).
1234 1238
@@ -1453,8 +1457,6 @@ clean-ups listed by key.
1453@cindex hungry-deletion 1457@cindex hungry-deletion
1454@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1458@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1455 1459
1456@kindex C-d
1457
1458If you want to delete an entire block of whitespace at point, you can 1460If you want to delete an entire block of whitespace at point, you can
1459use @dfn{hungry deletion}. This deletes all the contiguous whitespace 1461use @dfn{hungry deletion}. This deletes all the contiguous whitespace
1460either before point or after point in a single operation. 1462either before point or after point in a single operation.
@@ -1468,6 +1470,10 @@ Hungry deletion is a simple feature that some people find extremely
1468useful. In fact, you might find yourself wanting it in @strong{all} 1470useful. In fact, you might find yourself wanting it in @strong{all}
1469your editing modes! 1471your editing modes!
1470 1472
1473Loosely speaking, in what follows, @dfn{@key{DEL}} means ``the
1474backspace key'' and @dfn{@key{DELETE}} means ``the forward delete
1475key''. This is discussed in more detail below.
1476
1471There are two different ways you can use hungry deletion: 1477There are two different ways you can use hungry deletion:
1472 1478
1473@table @asis 1479@table @asis
@@ -1476,7 +1482,7 @@ Here you toggle Hungry Delete minor mode with @kbd{M-x
1476c-toggle-hungry-state}@footnote{Prior to @ccmode{} 5.31, this command 1482c-toggle-hungry-state}@footnote{Prior to @ccmode{} 5.31, this command
1477was bound to @kbd{C-c C-d}. @kbd{C-c C-d} is now the default binding 1483was bound to @kbd{C-c C-d}. @kbd{C-c C-d} is now the default binding
1478for @code{c-hungry-delete-forward}.} (@pxref{Minor Modes}.) This 1484for @code{c-hungry-delete-forward}.} (@pxref{Minor Modes}.) This
1479makes @kbd{@key{DEL}} and @kbd{C-d} do forward and backwards hungry 1485makes @kbd{@key{DEL}} and @kbd{C-d} do backwards and forward hungry
1480deletion. 1486deletion.
1481 1487
1482@table @asis 1488@table @asis
@@ -1524,61 +1530,62 @@ default value is @code{delete-char}.
1524 1530
1525@item Using Distinct Bindings 1531@item Using Distinct Bindings
1526The other (newer and recommended) way to use hungry deletion is to 1532The other (newer and recommended) way to use hungry deletion is to
1527perform @code{c-hungry-backspace} and @code{c-hungry-delete-forward} 1533perform @code{c-hungry-delete-backwards} and
1528directly through their key sequences rather than using the minor mode 1534@code{c-hungry-delete-forward} directly through their key sequences
1529toggling. 1535rather than using the minor mode toggling.
1530 1536
1531@table @asis 1537@table @asis
1532@item @kbd{C-c C-@key{Backspace}}, @kbd{C-c DEL}, or @kbd{C-c @key{Backspace}} (@code{c-hungry-backspace}) 1538@item @kbd{C-c C-@key{DEL}}, or @kbd{C-c @key{DEL}} (@code{c-hungry-delete-backwards})@footnote{This command was formerly known as @code{c-hungry-backspace}.}
1533@kindex C-c C-<backspace> 1539@kindex C-c C-<backspace>
1534@kindex C-c DEL
1535@kindex C-c <backspace> 1540@kindex C-c <backspace>
1536@findex c-hungry-backspace 1541@kindex C-c C-DEL
1537@findex hungry-backspace (c-) 1542@kindex C-c DEL
1543@findex c-hungry-delete-backwards
1544@findex hungry-delete-backwards (c-)
1538Delete any amount of whitespace in the backwards direction (regardless 1545Delete any amount of whitespace in the backwards direction (regardless
1539whether hungry-delete mode is enabled or not). This command is bound 1546whether hungry-delete mode is enabled or not). This command is bound
1540to both @kbd{C-c C-@key{Backspace}} and @kbd{C-c @key{Backspace}}, 1547to both @kbd{C-c C-@key{DEL}} and @kbd{C-c @key{DEL}}, since the more
1541since the more natural one, @kbd{C-c C-@key{Backspace}}, is sometimes 1548natural one, @kbd{C-c C-@key{DEL}}, is sometimes difficult to type at
1542difficult to type at a character terminal. 1549a character terminal.
1543 1550
1544@item @kbd{C-c C-@key{Delete}}, @kbd{C-c C-d}, or @kbd{C-c @key{Delete}} (@code{c-hungry-delete-forward}) 1551@item @kbd{C-c C-d}, @kbd{C-c C-@key{DELETE}}, or @kbd{C-c @key{DELETE}} (@code{c-hungry-delete-forward})
1545@kindex C-c C-<delete>
1546@kindex C-c C-d 1552@kindex C-c C-d
1547@kindex C-c <delete> 1553@kindex C-c C-<DELETE>
1554@kindex C-c <DELETE>
1548@findex c-hungry-delete-forward 1555@findex c-hungry-delete-forward
1549@findex hungry-delete-forward (c-) 1556@findex hungry-delete-forward (c-)
1550Delete any amount of whitespace in the forward direction (regardless 1557Delete any amount of whitespace in the forward direction (regardless
1551whether hungry-delete mode is enabled or not). This command is bound 1558whether hungry-delete mode is enabled or not). This command is bound
1552to both @kbd{C-c C-@key{Delete}} and @kbd{C-c @key{Delete}} for the 1559to both @kbd{C-c C-@key{DELETE}} and @kbd{C-c @key{DELETE}} for the
1553same reason as for @key{Backspace} above. 1560same reason as for @key{DEL} above.
1554@end table 1561@end table
1555@end table 1562@end table
1556 1563
1557@kindex <delete> 1564@kindex <delete>
1558@kindex <backspace> 1565@kindex <backspace>
1559 1566
1560When we talk about @kbd{DEL}, @kbd{C-d}, @key{Backspace} and 1567When we talk about @kbd{@key{DEL}}, and @kbd{@key{DELETE}} above, we
1561@key{Delete} above, we actually do so without connecting them to the 1568actually do so without connecting them to the physical keys commonly
1562physical keys commonly known as @key{Backspace} and @key{Delete}. The 1569known as @key{Backspace} and @key{Delete}. The default bindings to
1563default bindings to those two keys depends on the flavor of (X)Emacs 1570those two keys depends on the flavor of (X)Emacs you are using.
1564you are using.
1565 1571
1566@findex c-electric-delete 1572@findex c-electric-delete
1567@findex electric-delete (c-) 1573@findex electric-delete (c-)
1568@findex c-hungry-delete 1574@findex c-hungry-delete
1569@findex hungry-delete (c-) 1575@findex hungry-delete (c-)
1570@vindex delete-key-deletes-forward 1576@vindex delete-key-deletes-forward
1571
1572In XEmacs 20.3 and beyond, the @key{Backspace} key is bound to 1577In XEmacs 20.3 and beyond, the @key{Backspace} key is bound to
1573@code{c-electric-backspace} and the @key{Delete} key is bound to 1578@code{c-electric-backspace} and the @key{Delete} key is bound to
1574@code{c-electric-delete}. You control the direction it deletes in by 1579@code{c-electric-delete}. You control the direction it deletes in by
1575setting the variable @code{delete-key-deletes-forward}, a standard 1580setting the variable @code{delete-key-deletes-forward}, a standard
1576XEmacs variable. When this variable is non-@code{nil}, 1581XEmacs variable.
1577@code{c-electric-delete} will do forward deletion with 1582@c This variable is encapsulated by XEmacs's (defsubst delete-forward-p ...).
1578@code{c-electric-delete-forward}, otherwise it does backward deletion 1583When this variable is non-@code{nil}, @code{c-electric-delete} will do
1579with @code{c-electric-backspace}. Similarly, @kbd{C-c @key{Delete}} 1584forward deletion with @code{c-electric-delete-forward}, otherwise it
1580and @kbd{C-c C-@key{Delete}} are bound to @code{c-hungry-delete} which 1585does backward deletion with @code{c-electric-backspace}. Similarly,
1581is controlled in the same way by @code{delete-key-deletes-forward}. 1586@kbd{C-c @key{Delete}} and @kbd{C-c C-@key{Delete}} are bound to
1587@code{c-hungry-delete} which is controlled in the same way by
1588@code{delete-key-deletes-forward}.
1582 1589
1583@findex normal-erase-is-backspace-mode 1590@findex normal-erase-is-backspace-mode
1584 1591