aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLuc Teirlinck2004-04-11 15:44:38 +0000
committerLuc Teirlinck2004-04-11 15:44:38 +0000
commit54dffe35a5d575f94d97b55bce830553480c6177 (patch)
tree435716496e5399ce97e6972944df7643f52900b7 /src
parent3c1dc2cb2bffde236aafc64ab708e6858be7b16f (diff)
downloademacs-54dffe35a5d575f94d97b55bce830553480c6177.tar.gz
emacs-54dffe35a5d575f94d97b55bce830553480c6177.zip
(Fgenerate_new_buffer_name): Return NAME argument if IGNORE argument
equals NAME. Doc fix.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/buffer.c5
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 @@
12004-04-11 Luc Teirlinck <teirllm@auburn.edu>
2
3 * buffer.c (Fgenerate_new_buffer_name): Return NAME argument if
4 IGNORE argument equals NAME. Doc fix.
5
12004-04-11 Masatake YAMATO <jet@gyve.org> 62004-04-11 Masatake YAMATO <jet@gyve.org>
2 7
3 * buffer.c (fix_start_end_in_overlays): make overlays 8 * buffer.c (fix_start_end_in_overlays): make overlays
4 empty if they are backwards. 9 empty if they are backwards.
5 10
62004-04-07 Stefan Monnier <monnier@iro.umontreal.ca> 112004-04-07 Stefan Monnier <monnier@iro.umontreal.ca>
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
766 doc: /* Return a string that is the name of no existing buffer based on NAME. 766 doc: /* Return a string that is the name of no existing buffer based on NAME.
767If there is no live buffer named NAME, then return NAME. 767If there is no live buffer named NAME, then return NAME.
768Otherwise modify name by appending `<NUMBER>', incrementing NUMBER 768Otherwise modify name by appending `<NUMBER>', incrementing NUMBER
769until an unused name is found, and then return that name. 769\(starting at 2) until an unused name is found, and then return that name.
770Optional second argument IGNORE specifies a name that is okay to use 770Optional second argument IGNORE specifies a name that is okay to use
771\(if it is in the sequence to be tried) 771\(if it is in the sequence to be tried)
772even if a buffer with that name exists. */) 772even if a buffer with that name exists. */)
@@ -779,6 +779,9 @@ even if a buffer with that name exists. */)
779 779
780 CHECK_STRING (name); 780 CHECK_STRING (name);
781 781
782 tem = Fstring_equal (name, ignore);
783 if (!NILP (tem))
784 return name;
782 tem = Fget_buffer (name); 785 tem = Fget_buffer (name);
783 if (NILP (tem)) 786 if (NILP (tem))
784 return name; 787 return name;