]> code.delx.au - gnu-emacs/blobdiff - lispref/files.texi
*** empty log message ***
[gnu-emacs] / lispref / files.texi
index 35955f14b40d3cf7eeaa4927b238c2ceb218bceb..cb28ac8607ba7306fd1d2474f1b268f4d1f7116d 100644 (file)
@@ -1,7 +1,7 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
 @c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999
-@c   Free Software Foundation, Inc. 
+@c   Free Software Foundation, Inc.
 @c See the file elisp.texi for copying conditions.
 @setfilename ../info/files
 @node Files, Backups and Auto-Saving, Documentation, Top
@@ -92,7 +92,7 @@ temporary buffer.  Visiting the file is not necessary and takes longer.
 
 @deffn Command find-file filename &optional wildcards
 This command selects a buffer visiting the file @var{filename},
-using an existing buffer if there is one, and otherwise creating a 
+using an existing buffer if there is one, and otherwise creating a
 new buffer and reading the file into it.  It also returns that buffer.
 
 The body of the @code{find-file} function is very simple and looks
@@ -548,7 +548,7 @@ offset from the start of the file and writes the data from there.
 
 If @var{mustbenew} is non-@code{nil}, then @code{write-region} asks
 for confirmation if @var{filename} names an existing file.
-Starting in Emacs 21, if @var{mustbenew} is the symbol @code{excl}, 
+Starting in Emacs 21, if @var{mustbenew} is the symbol @code{excl},
 then @code{write-region} does not ask for confirmation, but instead
 it signals an error @code{file-already-exists} if the file already
 exists.
@@ -865,7 +865,7 @@ name of a text file, a directory, or even another symbolic link, or it
 may be a nonexistent file name.
 
 If the file @var{filename} is not a symbolic link (or there is no such file),
-@code{file-symlink-p} returns @code{nil}.  
+@code{file-symlink-p} returns @code{nil}.
 
 @example
 @group
@@ -1107,11 +1107,11 @@ For example, here are the file attributes for @file{files.texi}:
 @example
 @group
 (file-attributes "files.texi")
-     @result{}  (nil 1 2235 75 
-          (8489 20284) 
-          (8489 20284) 
+     @result{}  (nil 1 2235 75
+          (8489 20284)
+          (8489 20284)
           (8489 20285)
-          14906 "-rw-rw-rw-" 
+          14906 "-rw-rw-rw-"
           nil 129500 -32252)
 @end group
 @end example
@@ -1322,6 +1322,7 @@ be an integer).  Only the low 12 bits of @var{mode} are used.
 
 @c Emacs 19 feature
 @defun set-default-file-modes mode
+@cindex umask
 This function sets the default file protection for new files created by
 Emacs and its subprocesses.  Every file created with Emacs initially has
 this protection, or a subset of it (@code{write-region} will not give a
@@ -1522,14 +1523,14 @@ first character of the file name's last component.  For example,
 (file-name-sans-extension "big.hack/foo")
      @result{} "big.hack/foo"
 (file-name-sans-extension "/my/home/.emacs")
-     @result{} "/my/home.emacs"
+     @result{} "/my/home/.emacs"
 (file-name-sans-extension "/my/home/.emacs.el")
      @result{} "/my/home/.emacs"
 @end example
 @end defun
 
 @ignore
-Andrew Innes says that this 
+Andrew Innes says that this
 
 @c @defvar directory-sep-char
 @c @tindex directory-sep-char
@@ -1973,12 +1974,12 @@ default directory, and has five files whose names begin with @samp{f}:
 @example
 @group
 (file-name-all-completions "f" "")
-     @result{} ("foo" "file~" "file.c.~2~" 
+     @result{} ("foo" "file~" "file.c.~2~"
                 "file.c.~1~" "file.c")
 @end group
 
 @group
-(file-name-all-completions "fo" "")  
+(file-name-all-completions "fo" "")
      @result{} ("foo")
 @end group
 @end example
@@ -2125,7 +2126,7 @@ then the user will probably be happier if you do sort the names.
 @group
 (directory-files "~lewis")
      @result{} ("#foo#" "#foo.el#" "." ".."
-         "dired-mods.el" "files.texi" 
+         "dired-mods.el" "files.texi"
          "files.texi.~1~")
 @end group
 @end example
@@ -2279,20 +2280,23 @@ Here are the operations that a magic file name handler gets to handle:
 
 @ifnottex
 @noindent
-@code{add-name-to-file}, @code{copy-file}, @code{delete-directory},
+@code{access-file}, @code{add-name-to-file},
+@code{byte-compiler-base-file-name},@*
+@code{copy-file}, @code{delete-directory},
 @code{delete-file},
 @code{diff-latest-backup-file},
 @code{directory-file-name},
 @code{directory-files},
+@code{directory-files-and-attributes},
 @code{dired-call-process},
-@code{dired-compress-file}, @code{dired-uncache},
+@code{dired-compress-file}, @code{dired-uncache},@*
 @code{expand-file-name},
-@code{file-accessible-directory-p},@*
+@code{file-accessible-directory-p},
 @code{file-attributes},
 @code{file-directory-p},
-@code{file-executable-p}, @code{file-exists-p},@*
+@code{file-executable-p}, @code{file-exists-p},
 @code{file-local-copy},
-@code{file-modes}, @code{file-name-all-completions},@*
+@code{file-modes}, @code{file-name-all-completions},
 @code{file-name-as-directory},
 @code{file-name-completion},
 @code{file-name-directory},
@@ -2302,12 +2306,16 @@ Here are the operations that a magic file name handler gets to handle:
 @code{file-readable-p}, @code{file-regular-p}, @code{file-symlink-p},
 @code{file-truename}, @code{file-writable-p},
 @code{find-backup-file-name},
-@code{get-file-buffer},@*
+@code{find-file-noselect},@*
+@code{get-file-buffer},
 @code{insert-directory},
-@code{insert-file-contents},
+@code{insert-file-contents},@*
 @code{load}, @code{make-directory},
-@code{make-symbolic-link}, @code{rename-file}, @code{set-file-modes},
-@code{set-visited-file-modtime}, @code{shell-command},@*
+@code{make-directory-internal},
+@code{make-symbolic-link},@*
+@code{rename-file}, @code{set-file-modes},
+@code{set-visited-file-modtime}, @code{shell-command},
+@code{substitute-in-file-name},@*
 @code{unhandled-file-name-directory},
 @code{vc-registered},
 @code{verify-visited-file-modtime},@*
@@ -2316,11 +2324,14 @@ Here are the operations that a magic file name handler gets to handle:
 @iftex
 @noindent
 @flushleft
-@code{add-name-to-file}, @code{copy-file}, @code{delete-directory},
+@code{access-file}, @code{add-name-to-file},
+@code{byte-com@discretionary{}{}{}piler-base-file-name},
+@code{copy-file}, @code{delete-directory},
 @code{delete-file},
 @code{diff-latest-backup-file},
 @code{directory-file-name},
 @code{directory-files},
+@code{directory-files-and-at@discretionary{}{}{}tributes},
 @code{dired-call-process},
 @code{dired-compress-file}, @code{dired-uncache},
 @code{expand-file-name},
@@ -2339,12 +2350,16 @@ Here are the operations that a magic file name handler gets to handle:
 @code{file-readable-p}, @code{file-regular-p}, @code{file-symlink-p},
 @code{file-truename}, @code{file-writable-p},
 @code{find-backup-file-name},
+@code{find-file-noselect},
 @code{get-file-buffer},
 @code{insert-directory},
 @code{insert-file-contents},
 @code{load}, @code{make-direc@discretionary{}{}{}tory},
-@code{make-symbolic-link}, @code{rename-file}, @code{set-file-modes},
+@code{make-direc@discretionary{}{}{}tory-internal},
+@code{make-symbolic-link},
+@code{rename-file}, @code{set-file-modes},
 @code{set-visited-file-modtime}, @code{shell-command},
+@code{substitute-in-file-name},
 @code{unhandled-file-name-directory},
 @code{vc-regis@discretionary{}{}{}tered},
 @code{verify-visited-file-modtime},
@@ -2373,7 +2388,7 @@ for an operation it does not recognize.  Here's one way to do this:
         @dots{}
         ;; @r{Handle any operation we don't know about.}
         (t (let ((inhibit-file-name-handlers
-                  (cons 'my-file-handler 
+                  (cons 'my-file-handler
                         (and (eq inhibit-file-name-operation operation)
                              inhibit-file-name-handlers)))
                  (inhibit-file-name-operation operation))