aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorEli Zaretskii2011-02-18 12:23:51 +0200
committerEli Zaretskii2011-02-18 12:23:51 +0200
commite03b2fd40d5d4fda99e242c8ee9d9ca1c1d258ad (patch)
treed16435816f25c5b596d9ac75cf959ccda1335141 /doc
parent86ec878a6b04348c0931d10d630f07becd8d8c30 (diff)
downloademacs-e03b2fd40d5d4fda99e242c8ee9d9ca1c1d258ad.tar.gz
emacs-e03b2fd40d5d4fda99e242c8ee9d9ca1c1d258ad.zip
Document find-file-literally in the ELisp manual.
files.texi (Visiting Functions): Document find-file-literally, both the command and the variable.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/ChangeLog3
-rw-r--r--doc/lispref/files.texi30
2 files changed, 33 insertions, 0 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 1d95eaf678c..8673ed51907 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,5 +1,8 @@
12011-02-18 Eli Zaretskii <eliz@gnu.org> 12011-02-18 Eli Zaretskii <eliz@gnu.org>
2 2
3 * files.texi (Visiting Functions): Document find-file-literally,
4 both the command and the variable.
5
3 * variables.texi (Creating Buffer-Local): Explain the meaning of 6 * variables.texi (Creating Buffer-Local): Explain the meaning of
4 permanent local variables. 7 permanent local variables.
5 8
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index 1f66da98347..fd9f3bb4648 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -114,6 +114,26 @@ When @code{find-file} is called interactively, it prompts for
114@var{filename} in the minibuffer. 114@var{filename} in the minibuffer.
115@end deffn 115@end deffn
116 116
117@deffn Command find-file-literally filename
118This command visits @var{filename}, like @code{find-file} does, but it
119does not perform any format conversions (@pxref{Format Conversion}),
120character code conversions (@pxref{Coding Systems}), or end-of-line
121conversions (@pxref{Coding System Basics, End of line conversion}).
122The buffer visiting the file is made unibyte, and its major mode is
123Fundamental mode, regardless of the file name. File local variable
124specifications in the file (@pxref{File Local Variables}) are
125ignored, and automatic decompression and adding a newline at the end
126of the file due to @code{require-final-newline} (@pxref{Saving
127Buffers, require-final-newline}) are also disabled.
128
129Note that if Emacs already has a buffer visiting the same file
130non-literally, it will not visit the same file literally, but instead
131just switch to the existing buffer. If you want to be sure of
132accessing a file's contents literally, you should create a temporary
133buffer and then read the file contents into it using
134@code{insert-file-contents-literally} (@pxref{Reading from Files}).
135@end deffn
136
117@defun find-file-noselect filename &optional nowarn rawfile wildcards 137@defun find-file-noselect filename &optional nowarn rawfile wildcards
118This function is the guts of all the file-visiting functions. It 138This function is the guts of all the file-visiting functions. It
119returns a buffer visiting the file @var{filename}. You may make the 139returns a buffer visiting the file @var{filename}. You may make the
@@ -225,6 +245,16 @@ This is not a normal hook because the values of the functions are
225used, and in many cases only some of the functions are called. 245used, and in many cases only some of the functions are called.
226@end defvar 246@end defvar
227 247
248@defvar find-file-literally
249This buffer-local variable, if set to a non-@code{nil} value, makes
250@code{save-buffer} behave as if the buffer were visiting its file
251literally, i.e. without conversions of any kind. The command
252@code{find-file-literally} sets this variable's local value, but other
253equivalent functions and commands can do that as well, e.g.@: to avoid
254automatic addition of a newline at the end of the file. This variable
255us permanent local, so it is unaffected by changes of major modes.
256@end defvar
257
228@node Subroutines of Visiting 258@node Subroutines of Visiting
229@comment node-name, next, previous, up 259@comment node-name, next, previous, up
230@subsection Subroutines of Visiting 260@subsection Subroutines of Visiting