Mercurial > emacs
comparison doc/lispref/files.texi @ 100115:3a36c6c70cad
(Format Conversion Round-Trip): Rewrite format-write-file section yet again.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Tue, 02 Dec 2008 03:40:15 +0000 |
parents | 57eefe5edf84 |
children | cb5d2387102c |
comparison
equal
deleted
inserted
replaced
100114:bf1d69cb4681 | 100115:3a36c6c70cad |
---|---|
2980 When @code{write-region} writes data into a file, it first calls the | 2980 When @code{write-region} writes data into a file, it first calls the |
2981 encoding functions for the formats listed in @code{buffer-file-format}, | 2981 encoding functions for the formats listed in @code{buffer-file-format}, |
2982 in the order of appearance in the list. | 2982 in the order of appearance in the list. |
2983 | 2983 |
2984 @deffn Command format-write-file file format &optional confirm | 2984 @deffn Command format-write-file file format &optional confirm |
2985 This command writes the current buffer contents into the file | 2985 This command writes the current buffer contents into the file @var{file} |
2986 @var{file} in format @var{format}, and makes that format the default | 2986 in a format based on @var{format}, which is a list of format names. It |
2987 for future saves of the buffer. That is, it sets the buffer-local value | 2987 constructs the actual format starting from @var{format}, then appending |
2988 of @code{buffer-file-format} to @var{format}. It then appends any | 2988 any elements from the value of @code{buffer-file-format} with a non-nil |
2989 elements of the previous value with a non-nil @var{preserve} flag (see | 2989 @var{preserve} flag (see above), if they are not already present in |
2990 above), if they are not already present in the new value. | 2990 @var{format}. It then updates @code{buffer-file-format} with this |
2991 The argument @var{format} is a list of format names. | 2991 format, making it the default for future saves. Except for the |
2992 Except for the @var{format} argument, this command | 2992 @var{format} argument, this command is similar to @code{write-file}. In |
2993 is similar to @code{write-file}. In particular, @var{confirm} has the | 2993 particular, @var{confirm} has the same meaning and interactive treatment |
2994 same meaning and interactive treatment as the corresponding argument | 2994 as the corresponding argument to @code{write-file}. @xref{Definition of |
2995 to @code{write-file}. @xref{Definition of write-file}. | 2995 write-file}. |
2996 @end deffn | 2996 @end deffn |
2997 | 2997 |
2998 @deffn Command format-find-file file format | 2998 @deffn Command format-find-file file format |
2999 This command finds the file @var{file}, converting it according to | 2999 This command finds the file @var{file}, converting it according to |
3000 format @var{format}. It also makes @var{format} the default if the | 3000 format @var{format}. It also makes @var{format} the default if the |