Undefine setpgrp before setting it.
[bpt/emacs.git] / lispref / buffers.texi
index 8bc4cb3..b82c0df 100644 (file)
@@ -1,6 +1,7 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998 Free Software Foundation, Inc. 
+@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999
+@c   Free Software Foundation, Inc. 
 @c See the file elisp.texi for copying conditions.
 @setfilename ../info/buffers
 @node Buffers, Windows, Backups and Auto-Saving, Top
@@ -36,7 +37,7 @@ not be displayed in any windows.
 @comment  node-name,  next,  previous,  up
 @section Buffer Basics
 
-@ifinfo
+@ifnottex
   A @dfn{buffer} is a Lisp object containing text to be edited.  Buffers
 are used to hold the contents of files that are being visited; there may
 also be buffers that are not visiting files.  Although several buffers
@@ -44,7 +45,7 @@ normally exist, only one buffer is designated the @dfn{current
 buffer} at any time.  Most editing commands act on the contents of the
 current buffer.  Each buffer, including the current buffer, may or may
 not be displayed in any windows.
-@end ifinfo
+@end ifnottex
 
   Buffers in Emacs editing are objects that have distinct names and hold
 text that can be edited.  Buffers appear to Lisp programs as a special
@@ -334,9 +335,20 @@ produces a name not currently in use for any buffer by appending a
 number inside of @samp{<@dots{}>}.
 
 If the optional second argument @var{ignore} is non-@code{nil}, it
-should be buffer name in the sequence to be tried.  That name will be
-considered acceptable, if it is tried, even if a buffer with that name
-exists.
+should be a string; it makes a difference if it is a name in the
+sequence of names to be tried.  That name will be considered acceptable,
+if it is tried, even if a buffer with that name exists.  Thus, if
+buffers named @samp{foo}, @samp{foo<2>}, @samp{foo<3>} and @samp{foo<4>}
+exist,
+
+@example
+(generate-new-buffer-name "foo")
+     @result{} "foo<5>"
+(generate-new-buffer-name "foo" "foo<3>")
+     @result{} "foo<3>"
+(generate-new-buffer-name "foo" "foo<6>")
+     @result{} "foo<5>"
+@end example
 
 See the related function @code{generate-new-buffer} in @ref{Creating
 Buffers}.