]> code.delx.au - gnu-emacs/blobdiff - doc/emacs/regs.texi
* lisp/register.el (increment-register): Route it to `append-to-register',
[gnu-emacs] / doc / emacs / regs.texi
index 7e5b07221a0c86d996013c9a5bfa696fe10e9230..0a83c0bddddd3b489c3040fe123dda89aff6fb82 100644 (file)
@@ -1,8 +1,8 @@
 @c This is part of the Emacs manual.
-@c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2011
+@c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2012
 @c   Free Software Foundation, Inc.
 @c See file emacs.texi for copying conditions.
-@node Registers, Display, Killing, Top
+@node Registers
 @chapter Registers
 @cindex registers
 
@@ -92,6 +92,13 @@ Copy region into register @var{r} (@code{copy-to-register}).
 Insert text from register @var{r} (@code{insert-register}).
 @item M-x append-to-register @key{RET} @var{r}
 Append region to text in register @var{r}.
+
+@kindex C-x r +
+When register @var{r} contains text, you can use @kbd{C-x r +}
+(@code{increment-register}) to append to that register.  Note that
+command @kbd{C-x r +} behaves differently if @var{r} contains a
+number.  @xref{Number Registers}.
+
 @item M-x prepend-to-register @key{RET} @var{r}
 Prepend region to text in register @var{r}.
 @end table
@@ -116,6 +123,19 @@ region after appending it to the register.  The command
 the region text to the text in the register instead of
 @emph{appending} it.
 
+@vindex register-separator
+  When you are collecting text using @code{append-to-register} and
+@code{prepend-to-register}, you may want to separate individual
+collected pieces using a separator.  In that case, configure a
+@code{register-separator} and store the separator text in to that
+register.  For example, to get double newlines as text separator
+during the collection process, you can use the following setting.
+
+@example
+(setq register-separator ?+)
+(set-register register-separator "\n\n")
+@end example
+
 @kindex C-x r i
 @findex insert-register
   @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}).
 @item C-u @var{number} C-x r + @var{r}
 @kindex C-x r +
 @findex increment-register
-Increment the number in register @var{r} by @var{number}
-(@code{increment-register}).
+If @var{r} contains a number, increment the number in that register by
+@var{number}.  Note that command @kbd{C-x r +}
+(@code{increment-register}) behaves differently if @var{r} contains
+text.  @xref{Text Registers}.
 @item C-x r i @var{r}
 Insert the number from register @var{r} into the buffer.
 @end table
@@ -278,7 +300,7 @@ you can use it to edit your bookmark definitions or annotate the
 bookmarks.  Type @kbd{C-h m} in the bookmark buffer for more
 information about its special editing commands.
 
-  When you kill Emacs, Emacs offers to save your bookmark values, if
+  When you kill Emacs, Emacs saves your bookmarks, if
 you have changed any bookmark values.  You can also save the bookmarks
 at any time with the @kbd{M-x bookmark-save} command.  Bookmarks are
 saved to the file @file{~/.emacs.d/bookmarks} (for compatibility with
@@ -290,9 +312,10 @@ persist from one Emacs session to the next.
 @vindex bookmark-save-flag
   If you set the variable @code{bookmark-save-flag} to 1, each command
 that sets a bookmark will also save your bookmarks; this way, you
-don't lose any bookmark values even if Emacs crashes.  (The value, if
+don't lose any bookmark values even if Emacs crashes.  The value, if
 a number, says how many bookmark modifications should go by between
-saving.)
+saving.  If you set this variable to @code{nil}, Emacs only
+saves bookmarks if you explicitly use @kbd{M-x bookmark-save}.
 
 @vindex bookmark-search-size
   Bookmark position values are saved with surrounding context, so that