Mercurial > emacs
changeset 99791:5ed566a3bada
(Fswitch_to_buffer): Reword and mention new option
confirm-nonexistent-file-or-buffer in doc-string.
author | Martin Rudalics <rudalics@gmx.at> |
---|---|
date | Sat, 22 Nov 2008 11:35:01 +0000 |
parents | 1714afb5ddc4 |
children | 806c4d7db55d |
files | src/buffer.c |
diffstat | 1 files changed, 18 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/src/buffer.c Sat Nov 22 06:32:10 2008 +0000 +++ b/src/buffer.c Sat Nov 22 11:35:01 2008 +0000 @@ -1762,22 +1762,26 @@ DEFUN ("switch-to-buffer", Fswitch_to_buffer, Sswitch_to_buffer, 1, 2, "(list (read-buffer-to-switch \"Switch to buffer: \"))", - doc: /* Make BUFFER-OR-NAME current and display it in the selected window. -BUFFER-OR-NAME may be a buffer, a string, or nil. If BUFFER-OR-NAME is -nil, then this function chooses a buffer using `other-buffer'. If -BUFFER-OR-NAME is a string and does not identify an existing buffer, -then this function creates a buffer with that name. - -Optional second arg NORECORD non-nil means do not put this buffer at the -front of the list of recently selected ones. This function returns the -buffer it switched to as a Lisp object. - -If the selected window is the minibuffer window or dedicated to its -buffer, use `pop-to-buffer' for displaying the buffer. + doc: /* Make BUFFER-OR-NAME current and display it in selected window. +BUFFER-OR-NAME may be a buffer, a string \(a buffer name), or +nil. Return the buffer switched to. + +If BUFFER-OR-NAME is a string and does not identify an existing +buffer, create a new buffer with that name. Interactively, if +`confirm-nonexistent-file-or-buffer' is non-nil, request +confirmation before creating a new buffer. If BUFFER-OR-NAME is +nil, switch to buffer returned by `other-buffer'. + +Optional second arg NORECORD non-nil means do not put this buffer +at the front of the list of recently selected ones. This +function returns the buffer it switched to as a Lisp object. + +If the selected window is the minibuffer window or dedicated to +its buffer, use `pop-to-buffer' for displaying the buffer. WARNING: This is NOT the way to work on another buffer temporarily -within a Lisp program! Use `set-buffer' instead. That avoids messing -with the window-buffer correspondences. */) +within a Lisp program! Use `set-buffer' instead. That avoids +messing with the window-buffer correspondences. */) (buffer_or_name, norecord) Lisp_Object buffer_or_name, norecord; {