diff options
| author | Jambunathan K | 2012-09-08 16:09:06 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2012-09-08 16:09:06 -0400 |
| commit | 0979429b332b515b149453277dd7867c76fed51e (patch) | |
| tree | df72103d87ce64abd07dda5ff3c3b40eacf7698e /doc | |
| parent | ace2989a842a84483702cbef6284fe7a8300e18a (diff) | |
| download | emacs-0979429b332b515b149453277dd7867c76fed51e.tar.gz emacs-0979429b332b515b149453277dd7867c76fed51e.zip | |
* lisp/register.el (increment-register): Route it to `append-to-register',
if register contains text so that `C-x r +' can now be
used for appending to a text register.
(register): New group.
(register-separator): New user option.
(append-to-register, prepend-to-register): Add separator based on
`register-separator.
* doc/emacs/regs.texi (Text Registers): `C-x r +' can now be used instead of
M-x append-to-register. New option `register-separator'.
(Number Registers): Mention that `C-x r +' is polymorphic.
Fixes: debbugs:12217
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/emacs/ChangeLog | 12 | ||||
| -rw-r--r-- | doc/emacs/regs.texi | 26 |
2 files changed, 33 insertions, 5 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 49c472ca793..508dbbf8021 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2012-09-08 Jambunathan K <kjambunathan@gmail.com> | ||
| 2 | |||
| 3 | * regs.texi (Text Registers): `C-x r +' can now be used instead of | ||
| 4 | M-x append-to-register. New option `register-separator'. | ||
| 5 | (Number Registers): Mention that `C-x r +' is polymorphic. | ||
| 6 | |||
| 1 | 2012-09-07 Chong Yidong <cyd@gnu.org> | 7 | 2012-09-07 Chong Yidong <cyd@gnu.org> |
| 2 | 8 | ||
| 3 | * windows.texi (Window Choice): Don't mention obsolete | 9 | * windows.texi (Window Choice): Don't mention obsolete |
| @@ -10,9 +16,9 @@ | |||
| 10 | 16 | ||
| 11 | 2012-08-24 Michael Albinus <michael.albinus@gmx.de> | 17 | 2012-08-24 Michael Albinus <michael.albinus@gmx.de> |
| 12 | 18 | ||
| 13 | * cmdargs.texi (General Variables): Setting | 19 | * cmdargs.texi (General Variables): |
| 14 | $DBUS_SESSION_BUS_ADDRESS to a dummy value suppresses connections | 20 | Setting $DBUS_SESSION_BUS_ADDRESS to a dummy value suppresses |
| 15 | to the D-Bus session bus. (Bug#12112) | 21 | connections to the D-Bus session bus. (Bug#12112) |
| 16 | 22 | ||
| 17 | 2012-08-14 Eli Zaretskii <eliz@gnu.org> | 23 | 2012-08-14 Eli Zaretskii <eliz@gnu.org> |
| 18 | 24 | ||
diff --git a/doc/emacs/regs.texi b/doc/emacs/regs.texi index 72fd6458dde..0a83c0bdddd 100644 --- a/doc/emacs/regs.texi +++ b/doc/emacs/regs.texi | |||
| @@ -92,6 +92,13 @@ Copy region into register @var{r} (@code{copy-to-register}). | |||
| 92 | Insert text from register @var{r} (@code{insert-register}). | 92 | Insert text from register @var{r} (@code{insert-register}). |
| 93 | @item M-x append-to-register @key{RET} @var{r} | 93 | @item M-x append-to-register @key{RET} @var{r} |
| 94 | Append region to text in register @var{r}. | 94 | Append region to text in register @var{r}. |
| 95 | |||
| 96 | @kindex C-x r + | ||
| 97 | When register @var{r} contains text, you can use @kbd{C-x r +} | ||
| 98 | (@code{increment-register}) to append to that register. Note that | ||
| 99 | command @kbd{C-x r +} behaves differently if @var{r} contains a | ||
| 100 | number. @xref{Number Registers}. | ||
| 101 | |||
| 95 | @item M-x prepend-to-register @key{RET} @var{r} | 102 | @item M-x prepend-to-register @key{RET} @var{r} |
| 96 | Prepend region to text in register @var{r}. | 103 | Prepend region to text in register @var{r}. |
| 97 | @end table | 104 | @end table |
| @@ -116,6 +123,19 @@ region after appending it to the register. The command | |||
| 116 | the region text to the text in the register instead of | 123 | the region text to the text in the register instead of |
| 117 | @emph{appending} it. | 124 | @emph{appending} it. |
| 118 | 125 | ||
| 126 | @vindex register-separator | ||
| 127 | When you are collecting text using @code{append-to-register} and | ||
| 128 | @code{prepend-to-register}, you may want to separate individual | ||
| 129 | collected pieces using a separator. In that case, configure a | ||
| 130 | @code{register-separator} and store the separator text in to that | ||
| 131 | register. For example, to get double newlines as text separator | ||
| 132 | during the collection process, you can use the following setting. | ||
| 133 | |||
| 134 | @example | ||
| 135 | (setq register-separator ?+) | ||
| 136 | (set-register register-separator "\n\n") | ||
| 137 | @end example | ||
| 138 | |||
| 119 | @kindex C-x r i | 139 | @kindex C-x r i |
| 120 | @findex insert-register | 140 | @findex insert-register |
| 121 | @kbd{C-x r i @var{r}} inserts in the buffer the text from register | 141 | @kbd{C-x r i @var{r}} inserts in the buffer the text from register |
| @@ -191,8 +211,10 @@ Store @var{number} into register @var{r} (@code{number-to-register}). | |||
| 191 | @item C-u @var{number} C-x r + @var{r} | 211 | @item C-u @var{number} C-x r + @var{r} |
| 192 | @kindex C-x r + | 212 | @kindex C-x r + |
| 193 | @findex increment-register | 213 | @findex increment-register |
| 194 | Increment the number in register @var{r} by @var{number} | 214 | If @var{r} contains a number, increment the number in that register by |
| 195 | (@code{increment-register}). | 215 | @var{number}. Note that command @kbd{C-x r +} |
| 216 | (@code{increment-register}) behaves differently if @var{r} contains | ||
| 217 | text. @xref{Text Registers}. | ||
| 196 | @item C-x r i @var{r} | 218 | @item C-x r i @var{r} |
| 197 | Insert the number from register @var{r} into the buffer. | 219 | Insert the number from register @var{r} into the buffer. |
| 198 | @end table | 220 | @end table |