aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
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/buffer.c
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/buffer.c')
-rw-r--r--src/buffer.c5
1 files changed, 4 insertions, 1 deletions
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;