aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2001-02-17 17:35:47 +0000
committerRichard M. Stallman2001-02-17 17:35:47 +0000
commitbdb678d27594988945cd4d62b2d0be398f1be77e (patch)
tree913e9aa01946dc61b889093e12b6a579c1581d3b
parent80d7cf559e6c5e77055d268d8c38b5b4d7606b1c (diff)
downloademacs-bdb678d27594988945cd4d62b2d0be398f1be77e.tar.gz
emacs-bdb678d27594988945cd4d62b2d0be398f1be77e.zip
Rewrite kill-read-only-ok, Delete Selection mode, replace-rectangle.
-rw-r--r--man/killing.texi47
1 files changed, 25 insertions, 22 deletions
diff --git a/man/killing.texi b/man/killing.texi
index c297622188f..ec14dc87d7e 100644
--- a/man/killing.texi
+++ b/man/killing.texi
@@ -1,5 +1,5 @@
1@c This is part of the Emacs manual. 1@c This is part of the Emacs manual.
2@c Copyright (C) 1985,86,87,93,94,95,97,2000 Free Software Foundation, Inc. 2@c Copyright (C) 1985,86,87,93,94,95,97,00,2001 Free Software Foundation, Inc.
3@c See file emacs.texi for copying conditions. 3@c See file emacs.texi for copying conditions.
4@iftex 4@iftex
5@chapter Killing and Moving Text 5@chapter Killing and Moving Text
@@ -37,15 +37,14 @@ can use the @kbd{C-x u} (@code{undo}) command to undo it
37 37
38@vindex kill-read-only-ok 38@vindex kill-read-only-ok
39@cindex read-only text, killing 39@cindex read-only text, killing
40 By default, Emacs does not allow to kill text in read-only buffers. 40 You cannot kill read-only text, since such text does not allow any
41Setting the variable @code{kill-read-only-ok} to a non-@code{nil} value 41kind of modification. But some users like to use the kill commands to
42overrides that. To alert you to the fact that you killed read-only 42copy read-only text into the kill ring, without actually changing it.
43text, Emacs prints a message to that effect in the echo area. 43If you set the variable @code{kill-read-only-ok} to a non-@code{nil}
44 44value, the kill commands work specially in a read-only buffer: they
45 When @code{kill-read-only-ok} is @code{nil}, Emacs beeps if you try to 45move over text, and copy it to the kill ring, without actually
46kill text in a read-only buffers, but it puts the text you wanted to 46deleting it from the buffer. When this happens, a message in the echo
47kill into the kill ring anyway. This means you can use kill commands to 47area tells you what is happening.
48copy text from read-only buffers.
49 48
50 The delete commands include @kbd{C-d} (@code{delete-char}) and 49 The delete commands include @kbd{C-d} (@code{delete-char}) and
51@key{DEL} (@code{delete-backward-char}), which delete only one character at 50@key{DEL} (@code{delete-backward-char}), which delete only one character at
@@ -57,12 +56,13 @@ and @samp{delete} to say which they do.
57@cindex Delete Selection mode 56@cindex Delete Selection mode
58@cindex mode, Delete Selection 57@cindex mode, Delete Selection
59@findex delete-selection-mode 58@findex delete-selection-mode
60You can arrange for selected text to be killed when you insert something 59 Many window systems follow the convention that insertion while text
61and replaced by what you insert; this is the way many text interfaces 60is selected deletes the selected text. You can make Emacs behave this
62work. To do this turn on Delete Selection mode. with @kbd{M-x 61way by enabling Delete Selection mode, with @kbd{M-x
63delete-selection-mode} or using Custom. Also in Delete Selection mode 62delete-selection-mode}, or using Custom. Another effect of this mode
64@key{DEL}, @kbd{C-d} and some other keys will just kill the whole 63is that @key{DEL}, @kbd{C-d} and some other keys, when a selection
65selection and Transient Mark mode is turned on (@pxref{Transient Mark}). 64exists, will kill the whole selection. It also enables Transient Mark
65mode (@pxref{Transient Mark}).
66 66
67@menu 67@menu
68* Deletion:: Commands for deleting small amounts of text and 68* Deletion:: Commands for deleting small amounts of text and
@@ -502,6 +502,9 @@ starting from the left edge column of the rectangle.
502@item C-x r t @var{string} @key{RET} 502@item C-x r t @var{string} @key{RET}
503Insert @var{string} on each line of the region-rectangle 503Insert @var{string} on each line of the region-rectangle
504(@code{string-rectangle}). 504(@code{string-rectangle}).
505@item M-x replace-rectangle @key{RET} @var{string} @key{RET}
506Replaces each line of the region-rectangle with @var{string}
507(@code{string-rectangle}).
505@end table 508@end table
506 509
507 The rectangle operations fall into two classes: commands deleting and 510 The rectangle operations fall into two classes: commands deleting and
@@ -562,13 +565,13 @@ any difference to this command.
562 565
563@kindex C-x r t 566@kindex C-x r t
564@findex string-rectangle 567@findex string-rectangle
565The command @kbd{C-x r t} (@code{M-x string-rectangle}) inserts a 568 The command @kbd{C-x r t} (@code{M-x string-rectangle}) inserts a
566string on each line of the region-rectangle before the rectangle, 569string on each line of the region-rectangle before the rectangle,
567shifting text right. 570shifting text right.
568 571
569@findex replace-rectangle 572@findex replace-rectangle
570The command @kbd{M-x replace-rectangle} is similar, but replaces the 573 The command @kbd{M-x replace-rectangle} is similar to @kbd{C-x r t},
571original rectangle. The string's width need not be the same as the 574but replaces the original rectangle. The string's width need not be
572width of the rectangle. If the string's width is less, the text after 575the same as the width of the rectangle. If the string's width is
573the rectangle shifts left; if the string is wider than the rectangle, 576less, the text after the rectangle shifts left; if the string is wider
574the text after the rectangle shifts right. 577than the rectangle, the text after the rectangle shifts right.