Mercurial > emacs
changeset 54418:37dfb033f901
(clone-buffer): Doc fix.
author | Luc Teirlinck <teirllm@auburn.edu> |
---|---|
date | Thu, 18 Mar 2004 02:57:32 +0000 |
parents | ae0720c5c65c |
children | 4ef1f446e4d9 |
files | lisp/simple.el |
diffstat | 1 files changed, 16 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/simple.el Thu Mar 18 02:48:51 2004 +0000 +++ b/lisp/simple.el Thu Mar 18 02:57:32 2004 +0000 @@ -4313,11 +4313,22 @@ ;; - syntax-table ;; - overlays (defun clone-buffer (&optional newname display-flag) - "Create a twin copy of the current buffer. -If NEWNAME is nil, it defaults to the current buffer's name; -NEWNAME is modified by adding or incrementing <N> at the end as necessary. - -If DISPLAY-FLAG is non-nil, the new buffer is shown with `pop-to-buffer'. + "Create and return a twin copy of the current buffer. +Unlike an indirect buffer, the new buffer can be edited +independently of the old one (if it is not read-only). +NEWNAME is the name of the new buffer. It may be modified by +adding or incrementing <N> at the end as necessary to create a +unique buffer name. If nil, it defaults to the name of the +current buffer, with the proper suffix. If DISPLAY-FLAG is +non-nil, the new buffer is shown with `pop-to-buffer'. Trying to +clone a file-visiting buffer, or a buffer whose major mode symbol +has a non-nil `no-clone' property, results in an error. + +Interactively, DISPLAY-FLAG is t and NEWNAME is the name of the +current buffer with appropriate suffix. However, if a prefix +argument is given, then the command prompts for NEWNAME in the +minibuffer. + This runs the normal hook `clone-buffer-hook' in the new buffer after it has been set up properly in other respects." (interactive