diff options
| author | Richard M. Stallman | 2004-07-02 23:43:50 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2004-07-02 23:43:50 +0000 |
| commit | 83f411a2d2e259b3f3d26b3a627cf268b83b6946 (patch) | |
| tree | c8f987bc6787a884276a115097de67e829636afe | |
| parent | 8addb6ebbaecbad78010d66475d6ae5418cb0416 (diff) | |
| download | emacs-83f411a2d2e259b3f3d26b3a627cf268b83b6946.tar.gz emacs-83f411a2d2e259b3f3d26b3a627cf268b83b6946.zip | |
(Saving Buffers): Cleanup write-contents-function.
(Magic File Names): Cleanup file-remote-p.
| -rw-r--r-- | lispref/files.texi | 47 |
1 files changed, 23 insertions, 24 deletions
diff --git a/lispref/files.texi b/lispref/files.texi index 3fb9460da8a..4fe2d8567d3 100644 --- a/lispref/files.texi +++ b/lispref/files.texi | |||
| @@ -415,17 +415,17 @@ Even though this is not a normal hook, you can use @code{add-hook} and | |||
| 415 | 415 | ||
| 416 | @c Emacs 19 feature | 416 | @c Emacs 19 feature |
| 417 | @defvar write-contents-functions | 417 | @defvar write-contents-functions |
| 418 | This works just like @code{write-file-functions}, but it is intended for | 418 | 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 | 419 | 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 | 420 | 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 | 421 | modes, as buffer-local bindings for this variable. This variable |
| 422 | functions in this hook returns non-@code{nil}, the file is considered | 422 | 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 | 423 | new major mode always resets this variable, but calling |
| 424 | in @code{write-file-functions}. | 424 | @code{set-visited-file-name} does not. |
| 425 | 425 | ||
| 426 | This variable automatically becomes buffer-local whenever it is set; | 426 | 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 | 427 | is considered already written and the rest are not called and neither |
| 428 | calling @code{set-visited-file-name} does not. | 428 | are the functions in @code{write-file-functions}. |
| 429 | @end defvar | 429 | @end defvar |
| 430 | 430 | ||
| 431 | @defopt before-save-hook | 431 | @defopt before-save-hook |
| @@ -2646,23 +2646,22 @@ of the local copy file. | |||
| 2646 | @end defun | 2646 | @end defun |
| 2647 | 2647 | ||
| 2648 | @defun file-remote-p filename | 2648 | @defun file-remote-p filename |
| 2649 | This function tests whether @var{filename} is a remote file. The | 2649 | This function tests whether @var{filename} is a remote file. If |
| 2650 | return value is an identifier of the remote system, if @var{filename} | 2650 | @var{filename} is local (not remote), the return value is @code{nil}. |
| 2651 | is indeed remote. Besides the host name, the identifier may comprise | 2651 | 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. | 2652 | identifies the remote system. |
| 2653 | 2653 | ||
| 2654 | To illustrate, for the filename @code{/ssh:user@@host:/some/file}, the | 2654 | This identifier string may include a host name, a user name, and |
| 2655 | identifier is @code{/ssh:user@@host:}. | 2655 | characters designating the method used to access the remote system. |
| 2656 | 2656 | For example, the remote identifier string for the filename | |
| 2657 | If @var{filename} is local (not remote), then the return value is | 2657 | @code{/ssh:user@@host:/some/file} is @code{/ssh:user@@host:}. |
| 2658 | @code{nil}. | ||
| 2659 | 2658 | ||
| 2660 | If @code{file-remote-p} returns the same identifier for two different | 2659 | If @code{file-remote-p} returns the same identifier for two different |
| 2661 | filenames, then the file handler is the same, and also the files can | 2660 | filenames, that means they are stored on the same file system and can |
| 2662 | be accessed locally with respect to each other. This means, for | 2661 | be accessed locally with respect to each other. This means, for |
| 2663 | example, that it is possible to start a (remote) process accessing | 2662 | example, that it is possible to start a remote process accessing both |
| 2664 | both files at the same time. Implementors of file handlers need to | 2663 | files at the same time. Implementors of file handlers need to ensure |
| 2665 | ensure this. | 2664 | this principle is valid. |
| 2666 | @end defun | 2665 | @end defun |
| 2667 | 2666 | ||
| 2668 | @defun unhandled-file-name-directory filename | 2667 | @defun unhandled-file-name-directory filename |