From: Juri Linkov <juri@jurta.org>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: bug-gnu-emacs@gnu.org
Subject: Re: rename-buffer should have current buffer as default-value
Date: Sun, 25 Nov 2007 23:45:36 +0200 [thread overview]
Message-ID: <873auuatj3.fsf@jurta.org> (raw)
In-Reply-To: <DHEEKFAFJEFOJHLCFPFDIEIACCAA.drew.adams@oracle.com> (Drew Adams's message of "Sun, 25 Nov 2007 10:06:43 -0800")
> emacs -Q
> M-x rename-buffer RET M-n - there is no default value.
>
> The current buffer name should be the default value, available for
> editing.
It's a pity that neither `B' nor `b' interactive code letter can be
used becase `b' requires an existing buffer, and `B' provides the
other buffer's name as default. But fortunately now Lisp code is
allowed in the interactive specification of a C function:
Index: src/buffer.c
===================================================================
RCS file: /sources/emacs/emacs/src/buffer.c,v
retrieving revision 1.540
diff -c -r1.540 buffer.c
*** src/buffer.c 21 Nov 2007 20:59:46 -0000 1.540
--- src/buffer.c 25 Nov 2007 21:43:41 -0000
***************
*** 1169,1175 ****
}
\f
DEFUN ("rename-buffer", Frename_buffer, Srename_buffer, 1, 2,
! "sRename buffer (to new name): \nP",
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.
--- 1169,1176 ----
}
\f
DEFUN ("rename-buffer", Frename_buffer, Srename_buffer, 1, 2,
! "(list (read-buffer \"Rename buffer (to new 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.
--
Juri Linkov
http://www.jurta.org/emacs/
next prev parent reply other threads:[~2007-11-25 21:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-25 18:06 rename-buffer should have current buffer as default-value Drew Adams
2007-11-25 21:45 ` Juri Linkov [this message]
2007-11-25 21:56 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=873auuatj3.fsf@jurta.org \
--to=juri@jurta.org \
--cc=bug-gnu-emacs@gnu.org \
--cc=drew.adams@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).