Mercurial > emacs
comparison man/regs.texi @ 40267:dca37162945a
(RegText): Document append-to-register and prepend-to-register.
Suggested by Philip Lijnzaad <lijnzaad@ebi.ac.uk>.
Add index entries to all sections of the Registers chapter.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Wed, 24 Oct 2001 18:51:31 +0000 |
parents | 5c282c7df1cf |
children | ac85b3ae7a59 |
comparison
equal
deleted
inserted
replaced
40266:b3ad4265c0eb | 40267:dca37162945a |
---|---|
35 * Bookmarks:: Bookmarks are like registers, but persistent. | 35 * Bookmarks:: Bookmarks are like registers, but persistent. |
36 @end menu | 36 @end menu |
37 | 37 |
38 @node RegPos | 38 @node RegPos |
39 @section Saving Positions in Registers | 39 @section Saving Positions in Registers |
40 @cindex saving position in a register | |
40 | 41 |
41 Saving a position records a place in a buffer so that you can move | 42 Saving a position records a place in a buffer so that you can move |
42 back there later. Moving to a saved position switches to that buffer | 43 back there later. Moving to a saved position switches to that buffer |
43 and moves point to that place in it. | 44 and moves point to that place in it. |
44 | 45 |
68 again by visiting the same file. Of course, this works only for buffers | 69 again by visiting the same file. Of course, this works only for buffers |
69 that were visiting files. | 70 that were visiting files. |
70 | 71 |
71 @node RegText | 72 @node RegText |
72 @section Saving Text in Registers | 73 @section Saving Text in Registers |
74 @cindex saving text in a register | |
73 | 75 |
74 When you want to insert a copy of the same piece of text several | 76 When you want to insert a copy of the same piece of text several |
75 times, it may be inconvenient to yank it from the kill ring, since each | 77 times, it may be inconvenient to yank it from the kill ring, since each |
76 subsequent kill moves that entry further down the ring. An alternative | 78 subsequent kill moves that entry further down the ring. An alternative |
77 is to store the text in a register and later retrieve it. | 79 is to store the text in a register and later retrieve it. |
79 @table @kbd | 81 @table @kbd |
80 @item C-x r s @var{r} | 82 @item C-x r s @var{r} |
81 Copy region into register @var{r} (@code{copy-to-register}). | 83 Copy region into register @var{r} (@code{copy-to-register}). |
82 @item C-x r i @var{r} | 84 @item C-x r i @var{r} |
83 Insert text from register @var{r} (@code{insert-register}). | 85 Insert text from register @var{r} (@code{insert-register}). |
86 @item M-x append-to-register @key{RET} @var{r} | |
87 Append region to text in register @var{r}. | |
88 @item M-x prepend-to-register @key{RET} @var{r} | |
89 Prepend region to text in register @var{r}. | |
84 @end table | 90 @end table |
85 | 91 |
86 @kindex C-x r s | 92 @kindex C-x r s |
87 @kindex C-x r i | 93 @kindex C-x r i |
88 @findex copy-to-register | 94 @findex copy-to-register |
90 @kbd{C-x r s @var{r}} stores a copy of the text of the region into | 96 @kbd{C-x r s @var{r}} stores a copy of the text of the region into |
91 the register named @var{r}. @kbd{C-u C-x r s @var{r}}, the same | 97 the register named @var{r}. @kbd{C-u C-x r s @var{r}}, the same |
92 command with a numeric argument, deletes the text from the buffer as | 98 command with a numeric argument, deletes the text from the buffer as |
93 well; you can think of this as ``moving'' the region text into the register. | 99 well; you can think of this as ``moving'' the region text into the register. |
94 | 100 |
101 @findex append-to-register | |
102 @findex prepend-to-register | |
103 @kbd{M-x append-to-register @key{RET} @var{r}} appends the copy of | |
104 the text in the region to the text already stored in the register | |
105 named @var{r}. If invoked with a numeric argument, it deletes the | |
106 region after appending it to the register. A similar command | |
107 @code{prepend-to-register} works the same, except that it | |
108 @emph{prepends} the region text to the text in the register, rather | |
109 than @emph{appending} it. | |
110 | |
95 @kbd{C-x r i @var{r}} inserts in the buffer the text from register | 111 @kbd{C-x r i @var{r}} inserts in the buffer the text from register |
96 @var{r}. Normally it leaves point before the text and places the mark | 112 @var{r}. Normally it leaves point before the text and places the mark |
97 after, but with a numeric argument (@kbd{C-u}) it puts point after the | 113 after, but with a numeric argument (@kbd{C-u}) it puts point after the |
98 text and the mark before. | 114 text and the mark before. |
99 | 115 |
100 @node RegRect | 116 @node RegRect |
101 @section Saving Rectangles in Registers | 117 @section Saving Rectangles in Registers |
118 @cindex saving rectangle in a register | |
102 | 119 |
103 A register can contain a rectangle instead of linear text. The | 120 A register can contain a rectangle instead of linear text. The |
104 rectangle is represented as a list of strings. @xref{Rectangles}, for | 121 rectangle is represented as a list of strings. @xref{Rectangles}, for |
105 basic information on how to specify a rectangle in the buffer. | 122 basic information on how to specify a rectangle in the buffer. |
106 | 123 |
123 See also the command @code{sort-columns}, which you can think of | 140 See also the command @code{sort-columns}, which you can think of |
124 as sorting a rectangle. @xref{Sorting}. | 141 as sorting a rectangle. @xref{Sorting}. |
125 | 142 |
126 @node RegConfig | 143 @node RegConfig |
127 @section Saving Window Configurations in Registers | 144 @section Saving Window Configurations in Registers |
145 @cindex saving window configuration in a register | |
128 | 146 |
129 @findex window-configuration-to-register | 147 @findex window-configuration-to-register |
130 @findex frame-configuration-to-register | 148 @findex frame-configuration-to-register |
131 @kindex C-x r w | 149 @kindex C-x r w |
132 @kindex C-x r f | 150 @kindex C-x r f |
149 configuration become invisible. If you wish to delete these frames | 167 configuration become invisible. If you wish to delete these frames |
150 instead, use @kbd{C-u C-x r j @var{r}}. | 168 instead, use @kbd{C-u C-x r j @var{r}}. |
151 | 169 |
152 @node RegNumbers | 170 @node RegNumbers |
153 @section Keeping Numbers in Registers | 171 @section Keeping Numbers in Registers |
172 @cindex saving number in a register | |
154 | 173 |
155 There are commands to store a number in a register, to insert | 174 There are commands to store a number in a register, to insert |
156 the number in the buffer in decimal, and to increment it. These commands | 175 the number in the buffer in decimal, and to increment it. These commands |
157 can be useful in keyboard macros (@pxref{Keyboard Macros}). | 176 can be useful in keyboard macros (@pxref{Keyboard Macros}). |
158 | 177 |
175 argument increments the register value by 1; @kbd{C-x r n} with no | 194 argument increments the register value by 1; @kbd{C-x r n} with no |
176 numeric argument stores zero in the register. | 195 numeric argument stores zero in the register. |
177 | 196 |
178 @node RegFiles | 197 @node RegFiles |
179 @section Keeping File Names in Registers | 198 @section Keeping File Names in Registers |
199 @cindex saving fuile name in a register | |
180 | 200 |
181 If you visit certain file names frequently, you can visit them more | 201 If you visit certain file names frequently, you can visit them more |
182 conveniently if you put their names in registers. Here's the Lisp code | 202 conveniently if you put their names in registers. Here's the Lisp code |
183 used to put a file name in a register: | 203 used to put a file name in a register: |
184 | 204 |