Mercurial > emacs
changeset 54786:870b7a6bffb8
(Fgenerate_new_buffer_name): Return NAME argument if IGNORE argument
equals NAME. Doc fix.
author | Luc Teirlinck <teirllm@auburn.edu> |
---|---|
date | Sun, 11 Apr 2004 15:40:56 +0000 |
parents | 1fff9cffd37c |
children | c75633459e63 |
files | src/buffer.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/buffer.c Sun Apr 11 15:08:39 2004 +0000 +++ b/src/buffer.c Sun Apr 11 15:40:56 2004 +0000 @@ -766,7 +766,7 @@ doc: /* Return a string that is the name of no existing buffer based on NAME. If there is no live buffer named NAME, then return NAME. Otherwise modify name by appending `<NUMBER>', incrementing NUMBER -until an unused name is found, and then return that name. +\(starting at 2) until an unused name is found, and then return that name. Optional second argument IGNORE specifies a name that is okay to use \(if it is in the sequence to be tried) even if a buffer with that name exists. */) @@ -779,6 +779,9 @@ CHECK_STRING (name); + tem = Fstring_equal (name, ignore); + if (!NILP (tem)) + return name; tem = Fget_buffer (name); if (NILP (tem)) return name;