comparison lispref/files.texi @ 90399:a5812696f7bf unicode-pre-font-backend

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 274-284) - Update from CVS - Update etc/MORE.STUFF. - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 101) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-62
author Miles Bader <miles@gnu.org>
date Wed, 17 May 2006 07:46:49 +0000
parents 146cd8369025 9a270d0b2af7
children a8190f7e546e
comparison
equal deleted inserted replaced
90398:1f8d5cd37cf0 90399:a5812696f7bf
112 When @code{find-file} is called interactively, it prompts for 112 When @code{find-file} is called interactively, it prompts for
113 @var{filename} in the minibuffer. 113 @var{filename} in the minibuffer.
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
117 This function is the guts of all the file-visiting functions. It finds 117 This function is the guts of all the file-visiting functions. It
118 or creates a buffer visiting the file @var{filename}, and returns it. 118 returns a buffer visiting the file @var{filename}. You may make the
119 It uses an existing buffer if there is one, and otherwise creates a new 119 buffer current or display it in a window if you wish, but this
120 buffer and reads the file into it. You may make the buffer current or 120 function does not do so.
121 display it in a window if you wish, but this function does not do so. 121
122 122 The function returns an existing buffer if there is one; otherwise it
123 If @var{wildcards} is non-@code{nil}, 123 creates a new buffer and reads the file into it. When
124 then @code{find-file-noselect} expands wildcard 124 @code{find-file-noselect} uses an existing buffer, it first verifies
125 characters in @var{filename} and visits all the matching files. 125 that the file has not changed since it was last visited or saved in
126 126 that buffer. If the file has changed, this function asks the user
127 When @code{find-file-noselect} uses an existing buffer, it first 127 whether to reread the changed file. If the user says @samp{yes}, any
128 verifies that the file has not changed since it was last visited or 128 edits previously made in the buffer are lost.
129 saved in that buffer. If the file has changed, then this function asks 129
130 the user whether to reread the changed file. If the user says 130 Reading the file involves decoding the file's contents (@pxref{Coding
131 @samp{yes}, any changes previously made in the buffer are lost. 131 Systems}), including end-of-line conversion, and format conversion
132 (@pxref{Format Conversion}). If @var{wildcards} is non-@code{nil},
133 then @code{find-file-noselect} expands wildcard characters in
134 @var{filename} and visits all the matching files.
132 135
133 This function displays warning or advisory messages in various peculiar 136 This function displays warning or advisory messages in various peculiar
134 cases, unless the optional argument @var{nowarn} is non-@code{nil}. For 137 cases, unless the optional argument @var{nowarn} is non-@code{nil}. For
135 example, if it needs to create a buffer, and there is no file named 138 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
143 than the file just visited, and finishes by running the functions in 146 than the file just visited, and finishes by running the functions in
144 @code{find-file-hook}. 147 @code{find-file-hook}.
145 148
146 If the optional argument @var{rawfile} is non-@code{nil}, then 149 If the optional argument @var{rawfile} is non-@code{nil}, then
147 @code{after-find-file} is not called, and the 150 @code{after-find-file} is not called, and the
148 @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.
149 more, a non-@code{nil} @var{rawfile} value suppresses coding system 152 What's more, a non-@code{nil} @var{rawfile} value suppresses coding
150 conversion (@pxref{Coding Systems}) and format conversion (@pxref{Format 153 system conversion and format conversion.
151 Conversion}).
152 154
153 The @code{find-file-noselect} function usually returns the buffer that 155 The @code{find-file-noselect} function usually returns the buffer that
154 is visiting the file @var{filename}. But, if wildcards are actually 156 is visiting the file @var{filename}. But, if wildcards are actually
155 used and expanded, it returns a list of buffers that are visiting the 157 used and expanded, it returns a list of buffers that are visiting the
156 various files. 158 various files.
393 You might wish to save the file modes value returned by 395 You might wish to save the file modes value returned by
394 @code{backup-buffer} and use that (if non-@code{nil}) to set the mode 396 @code{backup-buffer} and use that (if non-@code{nil}) to set the mode
395 bits of the file that you write. This is what @code{save-buffer} 397 bits of the file that you write. This is what @code{save-buffer}
396 normally does. @xref{Making Backups,, Making Backup Files}. 398 normally does. @xref{Making Backups,, Making Backup Files}.
397 399
398 The hook functions in @code{write-file-functions} are also responsible for 400 The hook functions in @code{write-file-functions} are also responsible
399 encoding the data (if desired): they must choose a suitable coding 401 for encoding the data (if desired): they must choose a suitable coding
400 system (@pxref{Lisp and Coding Systems}), perform the encoding 402 system and end-of-line conversion (@pxref{Lisp and Coding Systems}),
401 (@pxref{Explicit Encoding}), and set @code{last-coding-system-used} to 403 perform the encoding (@pxref{Explicit Encoding}), and set
402 the coding system that was used (@pxref{Encoding and I/O}). 404 @code{last-coding-system-used} to the coding system that was used
405 (@pxref{Encoding and I/O}).
403 406
404 If you set this hook locally in a buffer, it is assumed to be 407 If you set this hook locally in a buffer, it is assumed to be
405 associated with the file or the way the contents of the buffer were 408 associated with the file or the way the contents of the buffer were
406 obtained. Thus the variable is marked as a permanent local, so that 409 obtained. Thus the variable is marked as a permanent local, so that
407 changing the major mode does not alter a buffer-local value. On the 410 changing the major mode does not alter a buffer-local value. On the
494 against the defined file formats, and converts the file contents if 497 against the defined file formats, and converts the file contents if
495 appropriate. @xref{Format Conversion}. It also calls the functions in 498 appropriate. @xref{Format Conversion}. It also calls the functions in
496 the list @code{after-insert-file-functions}; see @ref{Saving 499 the list @code{after-insert-file-functions}; see @ref{Saving
497 Properties}. Normally, one of the functions in the 500 Properties}. Normally, one of the functions in the
498 @code{after-insert-file-functions} list determines the coding system 501 @code{after-insert-file-functions} list determines the coding system
499 (@pxref{Coding Systems}) used for decoding the file's contents. 502 (@pxref{Coding Systems}) used for decoding the file's contents,
503 including end-of-line conversion.
500 504
501 If @var{visit} is non-@code{nil}, this function additionally marks the 505 If @var{visit} is non-@code{nil}, this function additionally marks the
502 buffer as unmodified and sets up various fields in the buffer so that it 506 buffer as unmodified and sets up various fields in the buffer so that it
503 is visiting the file @var{filename}: these include the buffer's visited 507 is visiting the file @var{filename}: these include the buffer's visited
504 file name and its last save file modtime. This feature is used by 508 file name and its last save file modtime. This feature is used by