emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-23 r100481: Document find-file-litera


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-23 r100481: Document find-file-literally in the ELisp manual.
Date: Fri, 18 Feb 2011 12:23:51 +0200
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100481
committer: Eli Zaretskii <address@hidden>
branch nick: emacs-23
timestamp: Fri 2011-02-18 12:23:51 +0200
message:
  Document find-file-literally in the ELisp manual.
  
   files.texi (Visiting Functions): Document find-file-literally,
   both the command and the variable.
modified:
  doc/lispref/ChangeLog
  doc/lispref/files.texi
=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog     2011-02-18 10:04:48 +0000
+++ b/doc/lispref/ChangeLog     2011-02-18 10:23:51 +0000
@@ -1,5 +1,8 @@
 2011-02-18  Eli Zaretskii  <address@hidden>
 
+       * files.texi (Visiting Functions): Document find-file-literally,
+       both the command and the variable.
+
        * variables.texi (Creating Buffer-Local): Explain the meaning of
        permanent local variables.
 

=== modified file 'doc/lispref/files.texi'
--- a/doc/lispref/files.texi    2011-01-08 22:01:13 +0000
+++ b/doc/lispref/files.texi    2011-02-18 10:23:51 +0000
@@ -114,6 +114,26 @@
 @var{filename} in the minibuffer.
 @end deffn
 
address@hidden Command find-file-literally filename
+This command visits @var{filename}, like @code{find-file} does, but it
+does not perform any format conversions (@pxref{Format Conversion}),
+character code conversions (@pxref{Coding Systems}), or end-of-line
+conversions (@pxref{Coding System Basics, End of line conversion}).
+The buffer visiting the file is made unibyte, and its major mode is
+Fundamental mode, regardless of the file name.  File local variable
+specifications  in the file (@pxref{File Local Variables}) are
+ignored, and automatic decompression and adding a newline at the end
+of the file due to @code{require-final-newline} (@pxref{Saving
+Buffers, require-final-newline}) are also disabled.
+
+Note that if Emacs already has a buffer visiting the same file
+non-literally, it will not visit the same file literally, but instead
+just switch to the existing buffer.  If you want to be sure of
+accessing a file's contents literally, you should create a temporary
+buffer and then read the file contents into it using
address@hidden (@pxref{Reading from Files}).
address@hidden deffn
+
 @defun find-file-noselect filename &optional nowarn rawfile wildcards
 This function is the guts of all the file-visiting functions.  It
 returns a buffer visiting the file @var{filename}.  You may make the
@@ -225,6 +245,16 @@
 used, and in many cases only some of the functions are called.
 @end defvar
 
address@hidden find-file-literally
+This buffer-local variable, if set to a address@hidden value, makes
address@hidden behave as if the buffer were visiting its file
+literally, i.e. without conversions of any kind.  The command
address@hidden sets this variable's local value, but other
+equivalent functions and commands can do that as well, e.g.@: to avoid
+automatic addition of a newline at the end of the file.  This variable
+us permanent local, so it is unaffected by changes of major modes.
address@hidden defvar
+
 @node Subroutines of Visiting
 @comment  node-name,  next,  previous,  up
 @subsection Subroutines of Visiting


reply via email to

[Prev in Thread] Current Thread [Next in Thread]