aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2006-05-14 22:50:09 +0000
committerRichard M. Stallman2006-05-14 22:50:09 +0000
commitf31263a46c452eacee8cc326d81112792bc0d6e4 (patch)
treeeccaa58ed4a20e0d991ef7d10dc8516d1df46ef8
parent85cc6738ed6d07b13ad749de80e47170a1df0d7a (diff)
downloademacs-f31263a46c452eacee8cc326d81112792bc0d6e4.tar.gz
emacs-f31263a46c452eacee8cc326d81112792bc0d6e4.zip
(Visiting Functions): Rewrite in find-file-noselect.
-rw-r--r--lispref/ChangeLog4
-rw-r--r--lispref/files.texi44
2 files changed, 25 insertions, 23 deletions
diff --git a/lispref/ChangeLog b/lispref/ChangeLog
index da050cc4004..52cfa33acfe 100644
--- a/lispref/ChangeLog
+++ b/lispref/ChangeLog
@@ -1,3 +1,7 @@
12006-05-14 Richard Stallman <rms@gnu.org>
2
3 * files.texi (Visiting Functions): Rewrite in find-file-noselect.
4
12006-05-13 Eli Zaretskii <eliz@gnu.org> 52006-05-13 Eli Zaretskii <eliz@gnu.org>
2 6
3 * buffers.texi (Current Buffer): Document that with-temp-buffer 7 * buffers.texi (Current Buffer): Document that with-temp-buffer
diff --git a/lispref/files.texi b/lispref/files.texi
index d23b5efdd67..0d944771a2e 100644
--- a/lispref/files.texi
+++ b/lispref/files.texi
@@ -114,21 +114,24 @@ When @code{find-file} is called interactively, it prompts for
114@end deffn 114@end deffn
115 115
116@defun find-file-noselect filename &optional nowarn rawfile wildcards 116@defun find-file-noselect filename &optional nowarn rawfile wildcards
117This function is the guts of all the file-visiting functions. It finds 117This function is the guts of all the file-visiting functions. It
118or creates a buffer visiting the file @var{filename}, and returns it. 118returns a buffer visiting the file @var{filename}. You may make the
119It uses an existing buffer if there is one, and otherwise creates a new 119buffer current or display it in a window if you wish, but this
120buffer and reads the file into it. You may make the buffer current or 120function does not do so.
121display it in a window if you wish, but this function does not do so. 121
122 122The function returns an existing buffer if there is one; otherwise it
123If @var{wildcards} is non-@code{nil}, 123creates a new buffer and reads the file into it. When
124then @code{find-file-noselect} expands wildcard 124@code{find-file-noselect} uses an existing buffer, it first verifies
125characters in @var{filename} and visits all the matching files. 125that the file has not changed since it was last visited or saved in
126 126that buffer. If the file has changed, this function asks the user
127When @code{find-file-noselect} uses an existing buffer, it first 127whether to reread the changed file. If the user says @samp{yes}, any
128verifies that the file has not changed since it was last visited or 128edits previously made in the buffer are lost.
129saved in that buffer. If the file has changed, then this function asks 129
130the user whether to reread the changed file. If the user says 130Reading the file involves decoding the file's contents (@pxref{Coding
131@samp{yes}, any changes previously made in the buffer are lost. 131Systems}), including end-of-line conversion, and format conversion
132(@pxref{Format Conversion}). If @var{wildcards} is non-@code{nil},
133then @code{find-file-noselect} expands wildcard characters in
134@var{filename} and visits all the matching files.
132 135
133This function displays warning or advisory messages in various peculiar 136This function displays warning or advisory messages in various peculiar
134cases, unless the optional argument @var{nowarn} is non-@code{nil}. For 137cases, unless the optional argument @var{nowarn} is non-@code{nil}. For
@@ -136,10 +139,6 @@ example, if it needs to create a buffer, and there is no file named
136@var{filename}, it displays the message @samp{(New file)} in the echo 139@var{filename}, it displays the message @samp{(New file)} in the echo
137area, and leaves the buffer empty. 140area, and leaves the buffer empty.
138 141
139Reading the file(s) into their respective buffers involves decoding
140the files' contents (@pxref{Coding Systems}), including end-of-line
141conversion.
142
143The @code{find-file-noselect} function normally calls 142The @code{find-file-noselect} function normally calls
144@code{after-find-file} after reading the file (@pxref{Subroutines of 143@code{after-find-file} after reading the file (@pxref{Subroutines of
145Visiting}). That function sets the buffer major mode, parses local 144Visiting}). That function sets the buffer major mode, parses local
@@ -149,10 +148,9 @@ than the file just visited, and finishes by running the functions in
149 148
150If the optional argument @var{rawfile} is non-@code{nil}, then 149If the optional argument @var{rawfile} is non-@code{nil}, then
151@code{after-find-file} is not called, and the 150@code{after-find-file} is not called, and the
152@code{find-file-not-found-functions} are not run in case of failure. What's 151@code{find-file-not-found-functions} are not run in case of failure.
153more, a non-@code{nil} @var{rawfile} value suppresses coding system 152What's more, a non-@code{nil} @var{rawfile} value suppresses coding
154conversion (@pxref{Coding Systems}) and format conversion (@pxref{Format 153system conversion and format conversion.
155Conversion}).
156 154
157The @code{find-file-noselect} function usually returns the buffer that 155The @code{find-file-noselect} function usually returns the buffer that
158is visiting the file @var{filename}. But, if wildcards are actually 156is visiting the file @var{filename}. But, if wildcards are actually