summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJuri Linkov <juri@jurta.org>2007-12-12 00:10:37 +0000
committerJuri Linkov <juri@jurta.org>2007-12-12 00:10:37 +0000
commitc7d97628b0b89069ae740bf0955d1bdb595e1a09 (patch)
treeb04ea66f519a7f7dee3a0b0fcb56c591389feeeb /src
parent5ec7fe1bff1362d0bb58d0bbc854ca815c1bc81d (diff)
downloademacs-c7d97628b0b89069ae740bf0955d1bdb595e1a09.tar.gz
(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.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/buffer.c5
2 files changed, 9 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 86bfa0ab211..babf84e1e85 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2007-12-12 Juri Linkov <juri@jurta.org>
+
+ * buffer.c (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.
+
2007-12-10 Stefan Monnier <monnier@iro.umontreal.ca>
* keyboard.c (Fcommand_execute): Call Qcall_interactively instead of
diff --git a/src/buffer.c b/src/buffer.c
index 44c449767c3..58e2bd9e4cd 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1187,8 +1187,9 @@ buffer as BUFFER. */)
}
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.