changeset 87265:40dcde0eb331

(Frename_buffer): In interactive spec replace `read-buffer' with `read-string' that uses `buffer-name-history' as history, and the current buffer's name as default.
author Juri Linkov <juri@jurta.org>
date Wed, 12 Dec 2007 00:09:56 +0000
parents 864814308855
children ef85b8e65f9f
files src/buffer.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/buffer.c	Tue Dec 11 08:28:49 2007 +0000
+++ b/src/buffer.c	Wed Dec 12 00:09:56 2007 +0000
@@ -1187,8 +1187,9 @@
 }
 
 DEFUN ("rename-buffer", Frename_buffer, Srename_buffer, 1, 2,
-       "(list (read-buffer \"Rename buffer (to new name): \" \
-	      (current-buffer)) current-prefix-arg)",
+       "(list (read-string \"Rename buffer (to new name): \" \
+	      nil 'buffer-name-history (buffer-name (current-buffer))) \
+	      current-prefix-arg)",
        doc: /* Change current buffer's name to NEWNAME (a string).
 If second arg UNIQUE is nil or omitted, it is an error if a
 buffer named NEWNAME already exists.