From 54dffe35a5d575f94d97b55bce830553480c6177 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sun, 11 Apr 2004 15:44:38 +0000 Subject: [PATCH] (Fgenerate_new_buffer_name): Return NAME argument if IGNORE argument equals NAME. Doc fix. --- src/ChangeLog | 7 ++++++- src/buffer.c | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 1b5144e5b56..a249a7e9051 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,11 @@ +2004-04-11 Luc Teirlinck + + * buffer.c (Fgenerate_new_buffer_name): Return NAME argument if + IGNORE argument equals NAME. Doc fix. + 2004-04-11 Masatake YAMATO - * buffer.c (fix_start_end_in_overlays): make overlays + * buffer.c (fix_start_end_in_overlays): make overlays empty if they are backwards. 2004-04-07 Stefan Monnier diff --git a/src/buffer.c b/src/buffer.c index 455b03efec2..d62e186fda8 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -766,7 +766,7 @@ DEFUN ("generate-new-buffer-name", Fgenerate_new_buffer_name, Sgenerate_new_buff 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 `', 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 @@ even if a buffer with that name exists. */) CHECK_STRING (name); + tem = Fstring_equal (name, ignore); + if (!NILP (tem)) + return name; tem = Fget_buffer (name); if (NILP (tem)) return name; -- 2.39.2