Mercurial > emacs
comparison src/buffer.c @ 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 | 270d85d8daeb |
| children | 2ddd196a711d |
comparison
equal
deleted
inserted
replaced
| 99790:1714afb5ddc4 | 99791:5ed566a3bada |
|---|---|
| 1760 return buffer; | 1760 return buffer; |
| 1761 } | 1761 } |
| 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, | 1768 |
| 1769 then this function creates a buffer with that name. | 1769 If BUFFER-OR-NAME is a string and does not identify an existing |
| 1770 | 1770 buffer, create a new buffer with that name. Interactively, if |
| 1771 Optional second arg NORECORD non-nil means do not put this buffer at the | 1771 `confirm-nonexistent-file-or-buffer' is non-nil, request |
| 1772 front of the list of recently selected ones. This function returns the | 1772 confirmation before creating a new buffer. If BUFFER-OR-NAME is |
| 1773 buffer it switched to as a Lisp object. | 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 { |
| 1784 char *err; | 1788 char *err; |
| 1785 | 1789 |
