diff options
| author | Chong Yidong | 2008-11-24 20:09:41 +0000 |
|---|---|---|
| committer | Chong Yidong | 2008-11-24 20:09:41 +0000 |
| commit | 2f4f09a94c9b1634af8da65f60c8d502da53eb6f (patch) | |
| tree | 5cbfabe2aaecea9c75564cf26c198da5e2f65549 | |
| parent | f90a5ae345be5b3d33feda99eb876fa81494616e (diff) | |
| download | emacs-2f4f09a94c9b1634af8da65f60c8d502da53eb6f.tar.gz emacs-2f4f09a94c9b1634af8da65f60c8d502da53eb6f.zip | |
(Select Buffer): Document confirm-nonexistent-file-or-buffer.
| -rw-r--r-- | doc/emacs/buffers.texi | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/doc/emacs/buffers.texi b/doc/emacs/buffers.texi index ee7227ddbdd..cbf9ba433d0 100644 --- a/doc/emacs/buffers.texi +++ b/doc/emacs/buffers.texi | |||
| @@ -92,13 +92,34 @@ history commands (@pxref{Minibuffer}). An empty argument to @kbd{C-x | |||
| 92 | b} specifies the buffer that was current most recently among those not | 92 | b} specifies the buffer that was current most recently among those not |
| 93 | now displayed in any window. | 93 | now displayed in any window. |
| 94 | 94 | ||
| 95 | @cindex minibuffer confirmation | ||
| 96 | @cindex confirming in the minibuffer | ||
| 95 | If you specify a buffer that does not exist, @kbd{C-x b} creates a | 97 | If you specify a buffer that does not exist, @kbd{C-x b} creates a |
| 96 | new, empty buffer that is not visiting any file, and selects it for | 98 | new, empty buffer that is not visiting any file, and selects it for |
| 97 | editing. You can use such a buffer for making temporary notes. If | 99 | editing. First, however, Emacs might prompt you for confirmation, in |
| 98 | you try to save it, you are asked for the file name to use. The new | 100 | case you entered the wrong buffer name. Emacs asks for confirmation |
| 99 | buffer's major mode is determined by the variable | 101 | only if the last key you typed, before submitting the minibuffer input |
| 100 | @code{default-major-mode}; the default value is Fundamental mode. | 102 | with @key{RET}, was @key{TAB} (@code{minibuffer-complete}). This |
| 101 | @xref{Major Modes}. | 103 | catches a common mistake, in which one types @key{RET} before |
| 104 | realizing that @key{TAB} did not complete far enough to yield the | ||
| 105 | desired buffer name (@pxref{Completion}). Emacs asks for confirmation | ||
| 106 | by putting the message @samp{[Confirm]} in the minibuffer; type | ||
| 107 | @key{RET} again to confirm and visit the buffer. | ||
| 108 | |||
| 109 | @vindex confirm-nonexistent-file-or-buffer | ||
| 110 | The variable @code{confirm-nonexistent-file-or-buffer} controls | ||
| 111 | whether Emacs asks for confirmation before visiting a new buffer. The | ||
| 112 | default value, @code{after-completion}, gives the behavior we have | ||
| 113 | just described. If the value is @code{nil}, Emacs never asks for | ||
| 114 | confirmation; for any other non-@code{nil} value, Emacs always asks | ||
| 115 | for confirmation. This variable also affects the @code{find-file} | ||
| 116 | command (@pxref{Visiting}). | ||
| 117 | |||
| 118 | One reason to switch to a new buffer is to use it for making | ||
| 119 | temporary notes. If you try to save it, you are asked for the file | ||
| 120 | name to use. The new buffer's major mode is determined by the | ||
| 121 | variable @code{default-major-mode}; the default value is Fundamental | ||
| 122 | mode. @xref{Major Modes}. | ||
| 102 | 123 | ||
| 103 | @kindex C-x @key{LEFT} | 124 | @kindex C-x @key{LEFT} |
| 104 | @kindex C-x @key{RIGHT} | 125 | @kindex C-x @key{RIGHT} |