/[emacs]/emacs/lispref/files.texi
ViewVC logotype

Diff of /emacs/lispref/files.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.70 by kai, Fri Jul 2 14:49:39 2004 UTC revision 1.71 by rms, Fri Jul 2 23:43:50 2004 UTC
# Line 415  Even though this is not a normal hook, y Line 415  Even though this is not a normal hook, y
415    
416  @c Emacs 19 feature  @c Emacs 19 feature
417  @defvar write-contents-functions  @defvar write-contents-functions
418  This works just like @code{write-file-functions}, but it is intended for  This works just like @code{write-file-functions}, but it is intended
419  hooks that pertain to the contents of the file, as opposed to hooks that  for hooks that pertain to the buffer's contents, not to the particular
420  pertain to the file's name or location.  Such hooks are usually set up by  visited file or its location.  Such hooks are usually set up by major
421  major modes, as buffer-local bindings for this variable.  If any of the  modes, as buffer-local bindings for this variable.  This variable
422  functions in this hook returns non-@code{nil}, the file is considered  automatically becomes buffer-local whenever it is set; switching to a
423  already written and the rest are not called and neither are the functions  new major mode always resets this variable, but calling
424  in @code{write-file-functions}.  @code{set-visited-file-name} does not.
425    
426  This variable automatically becomes buffer-local whenever it is set;  If any of the functions in this hook returns non-@code{nil}, the file
427  switching to a new major mode always resets this variable, but  is considered already written and the rest are not called and neither
428  calling @code{set-visited-file-name} does not.  are the functions in @code{write-file-functions}.
429  @end defvar  @end defvar
430    
431  @defopt before-save-hook  @defopt before-save-hook
# Line 2646  of the local copy file. Line 2646  of the local copy file.
2646  @end defun  @end defun
2647    
2648  @defun file-remote-p filename  @defun file-remote-p filename
2649  This function tests whether @var{filename} is a remote file.  The  This function tests whether @var{filename} is a remote file.  If
2650  return value is an identifier of the remote system, if @var{filename}  @var{filename} is local (not remote), the return value is @code{nil}.
2651  is indeed remote.  Besides the host name, the identifier may comprise  If @var{filename} is indeed remote, the return value is a string that
2652  a user name and a method used to access that system.  identifies the remote system.
2653    
2654  To illustrate, for the filename @code{/ssh:user@@host:/some/file}, the  This identifier string may include a host name, a user name, and
2655  identifier is @code{/ssh:user@@host:}.  characters designating the method used to access the remote system.
2656    For example, the remote identifier string for the filename
2657  If @var{filename} is local (not remote), then the return value is  @code{/ssh:user@@host:/some/file} is @code{/ssh:user@@host:}.
 @code{nil}.  
2658    
2659  If @code{file-remote-p} returns the same identifier for two different  If @code{file-remote-p} returns the same identifier for two different
2660  filenames, then the file handler is the same, and also the files can  filenames, that means they are stored on the same file system and can
2661  be accessed locally with respect to each other.  This means, for  be accessed locally with respect to each other.  This means, for
2662  example, that it is possible to start a (remote) process accessing  example, that it is possible to start a remote process accessing both
2663  both files at the same time.  Implementors of file handlers need to  files at the same time.  Implementors of file handlers need to ensure
2664  ensure this.  this principle is valid.
2665  @end defun  @end defun
2666    
2667  @defun unhandled-file-name-directory filename  @defun unhandled-file-name-directory filename

Legend:
Removed from v.1.70  
changed lines
  Added in v.1.71

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26