aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2008-11-24 20:09:41 +0000
committerChong Yidong2008-11-24 20:09:41 +0000
commit2f4f09a94c9b1634af8da65f60c8d502da53eb6f (patch)
tree5cbfabe2aaecea9c75564cf26c198da5e2f65549
parentf90a5ae345be5b3d33feda99eb876fa81494616e (diff)
downloademacs-2f4f09a94c9b1634af8da65f60c8d502da53eb6f.tar.gz
emacs-2f4f09a94c9b1634af8da65f60c8d502da53eb6f.zip
(Select Buffer): Document confirm-nonexistent-file-or-buffer.
-rw-r--r--doc/emacs/buffers.texi31
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
92b} specifies the buffer that was current most recently among those not 92b} specifies the buffer that was current most recently among those not
93now displayed in any window. 93now 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
96new, empty buffer that is not visiting any file, and selects it for 98new, empty buffer that is not visiting any file, and selects it for
97editing. You can use such a buffer for making temporary notes. If 99editing. First, however, Emacs might prompt you for confirmation, in
98you try to save it, you are asked for the file name to use. The new 100case you entered the wrong buffer name. Emacs asks for confirmation
99buffer's major mode is determined by the variable 101only if the last key you typed, before submitting the minibuffer input
100@code{default-major-mode}; the default value is Fundamental mode. 102with @key{RET}, was @key{TAB} (@code{minibuffer-complete}). This
101@xref{Major Modes}. 103catches a common mistake, in which one types @key{RET} before
104realizing that @key{TAB} did not complete far enough to yield the
105desired buffer name (@pxref{Completion}). Emacs asks for confirmation
106by 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
111whether Emacs asks for confirmation before visiting a new buffer. The
112default value, @code{after-completion}, gives the behavior we have
113just described. If the value is @code{nil}, Emacs never asks for
114confirmation; for any other non-@code{nil} value, Emacs always asks
115for confirmation. This variable also affects the @code{find-file}
116command (@pxref{Visiting}).
117
118 One reason to switch to a new buffer is to use it for making
119temporary notes. If you try to save it, you are asked for the file
120name to use. The new buffer's major mode is determined by the
121variable @code{default-major-mode}; the default value is Fundamental
122mode. @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}