diff options
| author | Eli Zaretskii | 2011-02-18 12:23:51 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2011-02-18 12:23:51 +0200 |
| commit | e03b2fd40d5d4fda99e242c8ee9d9ca1c1d258ad (patch) | |
| tree | d16435816f25c5b596d9ac75cf959ccda1335141 /doc | |
| parent | 86ec878a6b04348c0931d10d630f07becd8d8c30 (diff) | |
| download | emacs-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/ChangeLog | 3 | ||||
| -rw-r--r-- | doc/lispref/files.texi | 30 |
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 @@ | |||
| 1 | 2011-02-18 Eli Zaretskii <eliz@gnu.org> | 1 | 2011-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 | ||
| 118 | This command visits @var{filename}, like @code{find-file} does, but it | ||
| 119 | does not perform any format conversions (@pxref{Format Conversion}), | ||
| 120 | character code conversions (@pxref{Coding Systems}), or end-of-line | ||
| 121 | conversions (@pxref{Coding System Basics, End of line conversion}). | ||
| 122 | The buffer visiting the file is made unibyte, and its major mode is | ||
| 123 | Fundamental mode, regardless of the file name. File local variable | ||
| 124 | specifications in the file (@pxref{File Local Variables}) are | ||
| 125 | ignored, and automatic decompression and adding a newline at the end | ||
| 126 | of the file due to @code{require-final-newline} (@pxref{Saving | ||
| 127 | Buffers, require-final-newline}) are also disabled. | ||
| 128 | |||
| 129 | Note that if Emacs already has a buffer visiting the same file | ||
| 130 | non-literally, it will not visit the same file literally, but instead | ||
| 131 | just switch to the existing buffer. If you want to be sure of | ||
| 132 | accessing a file's contents literally, you should create a temporary | ||
| 133 | buffer 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 |
| 118 | This function is the guts of all the file-visiting functions. It | 138 | This function is the guts of all the file-visiting functions. It |
| 119 | returns a buffer visiting the file @var{filename}. You may make the | 139 | returns 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 | |||
| 225 | used, and in many cases only some of the functions are called. | 245 | used, and in many cases only some of the functions are called. |
| 226 | @end defvar | 246 | @end defvar |
| 227 | 247 | ||
| 248 | @defvar find-file-literally | ||
| 249 | This 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 | ||
| 251 | literally, i.e. without conversions of any kind. The command | ||
| 252 | @code{find-file-literally} sets this variable's local value, but other | ||
| 253 | equivalent functions and commands can do that as well, e.g.@: to avoid | ||
| 254 | automatic addition of a newline at the end of the file. This variable | ||
| 255 | us 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 |