unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Docstring of rename-buffer
@ 2011-08-24 12:42 Antoine Levitt
  2011-08-24 15:05 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Antoine Levitt @ 2011-08-24 12:42 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 196 bytes --]

rename-buffer currently prompts "Rename buffer (to new name)", which
feels a bit clumsy (the parenthesis is here to dispel an ambiguity that
could be avoided in the first place). How about this?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: docstring-rename-buffer.diff --]
[-- Type: text/x-diff, Size: 867 bytes --]

=== modified file 'src/ChangeLog'
--- src/ChangeLog	2011-08-24 11:49:54 +0000
+++ src/ChangeLog	2011-08-24 12:41:30 +0000
@@ -1,3 +1,7 @@
+2011-08-24  Antoine Levitt  <antoine.levitt@gmail.com>
+
+	* buffer.c (Frename_buffer): Clarify prompt.
+
 2011-08-24  Eli Zaretskii  <eliz@gnu.org>
 
 	* xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte

=== modified file 'src/buffer.c'
--- src/buffer.c	2011-07-28 17:46:21 +0000
+++ src/buffer.c	2011-08-24 12:30:18 +0000
@@ -1233,7 +1233,7 @@
 }
 \f
 DEFUN ("rename-buffer", Frename_buffer, Srename_buffer, 1, 2,
-       "(list (read-string \"Rename buffer (to new name): \" \
+       "(list (read-string (format \"Rename %s to: \" (current-buffer)) \
 	      nil 'buffer-name-history (buffer-name (current-buffer))) \
 	      current-prefix-arg)",
        doc: /* Change current buffer's name to NEWNAME (a string).


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Docstring of rename-buffer
  2011-08-24 12:42 Docstring of rename-buffer Antoine Levitt
@ 2011-08-24 15:05 ` Stefan Monnier
  2011-08-24 15:37   ` Antoine Levitt
  2011-08-26 19:59   ` Chong Yidong
  0 siblings, 2 replies; 4+ messages in thread
From: Stefan Monnier @ 2011-08-24 15:05 UTC (permalink / raw)
  To: emacs-devel

>  DEFUN ("rename-buffer", Frename_buffer, Srename_buffer, 1, 2,
> -       "(list (read-string \"Rename buffer (to new name): \" \
> +       "(list (read-string (format \"Rename %s to: \" (current-buffer)) \
>  	      nil 'buffer-name-history (buffer-name (current-buffer))) \
>  	      current-prefix-arg)",
>         doc: /* Change current buffer's name to NEWNAME (a string).

Sounds good, please apply,


        Stefan



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Docstring of rename-buffer
  2011-08-24 15:05 ` Stefan Monnier
@ 2011-08-24 15:37   ` Antoine Levitt
  2011-08-26 19:59   ` Chong Yidong
  1 sibling, 0 replies; 4+ messages in thread
From: Antoine Levitt @ 2011-08-24 15:37 UTC (permalink / raw)
  To: emacs-devel

24/08/11 17:05, Stefan Monnier
>>  DEFUN ("rename-buffer", Frename_buffer, Srename_buffer, 1, 2,
>> -       "(list (read-string \"Rename buffer (to new name): \" \
>> +       "(list (read-string (format \"Rename %s to: \" (current-buffer)) \
>>  	      nil 'buffer-name-history (buffer-name (current-buffer))) \
>>  	      current-prefix-arg)",
>>         doc: /* Change current buffer's name to NEWNAME (a string).
>
> Sounds good, please apply,
>
>
>         Stefan

Are you talking to me? I can't, I haven't got commit access, I was
posting the patch so that someone could commit it.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Docstring of rename-buffer
  2011-08-24 15:05 ` Stefan Monnier
  2011-08-24 15:37   ` Antoine Levitt
@ 2011-08-26 19:59   ` Chong Yidong
  1 sibling, 0 replies; 4+ messages in thread
From: Chong Yidong @ 2011-08-26 19:59 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>  DEFUN ("rename-buffer", Frename_buffer, Srename_buffer, 1, 2,
>> -       "(list (read-string \"Rename buffer (to new name): \" \
>> +       "(list (read-string (format \"Rename %s to: \" (current-buffer)) \
>>  	      nil 'buffer-name-history (buffer-name (current-buffer))) \
>>  	      current-prefix-arg)",
>>         doc: /* Change current buffer's name to NEWNAME (a string).
>
> Sounds good, please apply,

For consistency with other similar commands, I think it's better to ask
"Rename buffer to: ", omitting the old buffer name.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-08-26 19:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-24 12:42 Docstring of rename-buffer Antoine Levitt
2011-08-24 15:05 ` Stefan Monnier
2011-08-24 15:37   ` Antoine Levitt
2011-08-26 19:59   ` Chong Yidong

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).