diff options
| author | Martin Rudalics | 2008-11-22 11:35:45 +0000 |
|---|---|---|
| committer | Martin Rudalics | 2008-11-22 11:35:45 +0000 |
| commit | ee50ff07eb4e1d1e40268e13c0925f6814c0c0bc (patch) | |
| tree | f85d3b1c7e9b0501c0d3e5a2f1b85393569eda59 /src/buffer.c | |
| parent | c8548a00159f164f3981ac8a7b1afc13d09086d5 (diff) | |
| download | emacs-ee50ff07eb4e1d1e40268e13c0925f6814c0c0bc.tar.gz emacs-ee50ff07eb4e1d1e40268e13c0925f6814c0c0bc.zip | |
(Fswitch_to_buffer): Reword and mention new option
confirm-nonexistent-file-or-buffer in doc-string.
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/buffer.c b/src/buffer.c index 4e87498ea51..8041e3abce5 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -1762,22 +1762,26 @@ switch_to_buffer_1 (buffer_or_name, norecord) | |||
| 1762 | 1762 | ||
| 1763 | DEFUN ("switch-to-buffer", Fswitch_to_buffer, Sswitch_to_buffer, 1, 2, | 1763 | DEFUN ("switch-to-buffer", Fswitch_to_buffer, Sswitch_to_buffer, 1, 2, |
| 1764 | "(list (read-buffer-to-switch \"Switch to buffer: \"))", | 1764 | "(list (read-buffer-to-switch \"Switch to buffer: \"))", |
| 1765 | doc: /* Make BUFFER-OR-NAME current and display it in the selected window. | 1765 | doc: /* Make BUFFER-OR-NAME current and display it in selected window. |
| 1766 | BUFFER-OR-NAME may be a buffer, a string, or nil. If BUFFER-OR-NAME is | 1766 | BUFFER-OR-NAME may be a buffer, a string \(a buffer name), or |
| 1767 | nil, then this function chooses a buffer using `other-buffer'. If | 1767 | nil. Return the buffer switched to. |
| 1768 | BUFFER-OR-NAME is a string and does not identify an existing buffer, | ||
| 1769 | then this function creates a buffer with that name. | ||
| 1770 | 1768 | ||
| 1771 | Optional second arg NORECORD non-nil means do not put this buffer at the | 1769 | If BUFFER-OR-NAME is a string and does not identify an existing |
| 1772 | front of the list of recently selected ones. This function returns the | 1770 | buffer, create a new buffer with that name. Interactively, if |
| 1773 | buffer it switched to as a Lisp object. | 1771 | `confirm-nonexistent-file-or-buffer' is non-nil, request |
| 1772 | confirmation before creating a new buffer. If BUFFER-OR-NAME is | ||
| 1773 | nil, switch to buffer returned by `other-buffer'. | ||
| 1774 | 1774 | ||
| 1775 | If the selected window is the minibuffer window or dedicated to its | 1775 | Optional second arg NORECORD non-nil means do not put this buffer |
| 1776 | buffer, use `pop-to-buffer' for displaying the buffer. | 1776 | at the front of the list of recently selected ones. This |
| 1777 | function returns the buffer it switched to as a Lisp object. | ||
| 1778 | |||
| 1779 | If the selected window is the minibuffer window or dedicated to | ||
| 1780 | its buffer, use `pop-to-buffer' for displaying the buffer. | ||
| 1777 | 1781 | ||
| 1778 | WARNING: This is NOT the way to work on another buffer temporarily | 1782 | WARNING: This is NOT the way to work on another buffer temporarily |
| 1779 | within a Lisp program! Use `set-buffer' instead. That avoids messing | 1783 | within a Lisp program! Use `set-buffer' instead. That avoids |
| 1780 | with the window-buffer correspondences. */) | 1784 | messing with the window-buffer correspondences. */) |
| 1781 | (buffer_or_name, norecord) | 1785 | (buffer_or_name, norecord) |
| 1782 | Lisp_Object buffer_or_name, norecord; | 1786 | Lisp_Object buffer_or_name, norecord; |
| 1783 | { | 1787 | { |