aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2008-03-28 19:04:23 +0000
committerChong Yidong2008-03-28 19:04:23 +0000
commit25716538ef22736ff5d9f04ef3644019eb98dd9a (patch)
tree9073e80074cf96ce53f7b7349e6fc6b0db6fa804
parent4c987d7128087de46f87cfb9b0eebe837e7b4cc7 (diff)
downloademacs-25716538ef22736ff5d9f04ef3644019eb98dd9a.tar.gz
emacs-25716538ef22736ff5d9f04ef3644019eb98dd9a.zip
(Moving by Defuns, Expressions, Comment Commands): Describe Transient
Mark mode as the default.
-rw-r--r--doc/emacs/programs.texi50
1 files changed, 25 insertions, 25 deletions
diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi
index 9c12199b00c..2b8cbf895fa 100644
--- a/doc/emacs/programs.texi
+++ b/doc/emacs/programs.texi
@@ -257,14 +257,15 @@ the same as @kbd{C-M-a} with a positive argument.
257 257
258@kindex C-M-h @r{(C mode)} 258@kindex C-M-h @r{(C mode)}
259@findex c-mark-function 259@findex c-mark-function
260 To operate on the current defun, use @kbd{C-M-h} (@code{mark-defun}) 260 To operate on the current defun, use @kbd{C-M-h}
261which puts point at the beginning and mark at the end of the current 261(@code{mark-defun}), which sets the mark at the end of the current
262defun. This is the easiest way to get ready to kill the defun in 262defun and puts point at its beginning. @xref{Marking Objects}. This
263order to move it to a different place in the file. If you use the 263is the easiest way to get ready to kill the defun in order to move it
264command while point is between defuns, it uses the following defun. 264to a different place in the file. If you use the command while point
265Successive uses of @kbd{C-M-h}, or using it in Transient Mark mode 265is between defuns, it uses the following defun. If you use the
266when the mark is active, extends the end of the region to include one 266command while the mark is already active, it sets the mark but does
267more defun each time. 267not move point; furthermore, each successive use of @kbd{C-M-h}
268extends the end of the region to include one more defun.
268 269
269 In C mode, @kbd{C-M-h} runs the function @code{c-mark-function}, 270 In C mode, @kbd{C-M-h} runs the function @code{c-mark-function},
270which is almost the same as @code{mark-defun}; the difference is that 271which is almost the same as @code{mark-defun}; the difference is that
@@ -739,13 +740,14 @@ after point and the mark.
739@kindex C-M-@key{SPC} 740@kindex C-M-@key{SPC}
740@findex mark-sexp 741@findex mark-sexp
741 To set the region around the next balanced expression in the buffer, 742 To set the region around the next balanced expression in the buffer,
742use @kbd{C-M-@@} (@code{mark-sexp}), which sets mark at the same place 743use @kbd{C-M-@key{SPC}} (@code{mark-sexp}), which sets mark at the
743that @kbd{C-M-f} would move to. @kbd{C-M-@@} takes arguments like 744same place that @kbd{C-M-f} would move to. @kbd{C-M-@key{SPC}} treats
744@kbd{C-M-f}. In particular, a negative argument is useful for putting 745numeric arguments in the same way as @kbd{C-M-f}; in particular, a
745the mark at the beginning of the previous balanced expression. The 746negative argument puts the mark at the beginning of the previous
746alias @kbd{C-M-@key{SPC}} is equivalent to @kbd{C-M-@@}. When you 747balanced expression. The alias @kbd{C-M-@@} is equivalent to
747repeat this command, or use it in Transient Mark mode when the mark is 748@kbd{C-M-@key{SPC}}. While the mark is active, each successive use of
748active, it extends the end of the region by one sexp each time. 749@kbd{C-M-@key{SPC}} extends the region by shifting the mark by one
750sexp.
749 751
750 In languages that use infix operators, such as C, it is not possible 752 In languages that use infix operators, such as C, it is not possible
751to recognize all balanced expressions as such because there can be 753to recognize all balanced expressions as such because there can be
@@ -941,16 +943,14 @@ programmed so that when it receives a prefix argument it calls
941@code{comment-kill}. However, @code{comment-kill} is a valid command 943@code{comment-kill}. However, @code{comment-kill} is a valid command
942in its own right, and you can bind it directly to a key if you wish. 944in its own right, and you can bind it directly to a key if you wish.
943 945
944 @kbd{M-;} does two other jobs when used with an active region in 946 When a region is active, @kbd{M-;} does either adds or removes
945Transient Mark mode (@pxref{Transient Mark}). Then it either adds or 947comment delimiters on each line of the region. @xref{Mark}. If every
946removes comment delimiters on each line of the region. (If every line 948line in the region is a comment, it removes comment delimiters from
947is a comment, it removes comment delimiters from each; otherwise, it 949each; otherwise, it adds comment delimiters to each. You can also use
948adds comment delimiters to each.) If you are not using Transient Mark 950the commands @code{comment-region} and @code{uncomment-region} to do
949mode, then you should use the commands @code{comment-region} and 951these jobs (@pxref{Multi-Line Comments}). A prefix argument used in
950@code{uncomment-region} to do these jobs (@pxref{Multi-Line Comments}), 952these circumstances specifies how many comment delimiters to add or
951or else enable Transient Mark mode momentarily (@pxref{Momentary Mark}). 953how many to delete.
952A prefix argument used in these circumstances specifies how many
953comment delimiters to add or how many to delete.
954 954
955 Some major modes have special rules for aligning certain kinds of 955 Some major modes have special rules for aligning certain kinds of
956comments in certain contexts. For example, in Lisp code, comments which 956comments in certain contexts. For example, in Lisp code, comments which