diff options
| author | Michael Albinus | 2007-07-08 18:08:36 +0000 |
|---|---|---|
| committer | Michael Albinus | 2007-07-08 18:08:36 +0000 |
| commit | 62256aa78bd801c83724159b129259455eaf63ad (patch) | |
| tree | 7ddf4d79d446b1e8885cb80b55a99331593cd8cb | |
| parent | 7aa8eec2fbf6c79f2e1ec2dcbbdacea311389538 (diff) | |
| download | emacs-62256aa78bd801c83724159b129259455eaf63ad.tar.gz emacs-62256aa78bd801c83724159b129259455eaf63ad.zip | |
* files.texi (Magic File Names): Introduce optional parameter
CONNECTED for `file-remote-p'.
| -rw-r--r-- | lispref/ChangeLog | 7 | ||||
| -rw-r--r-- | lispref/files.texi | 10 |
2 files changed, 14 insertions, 3 deletions
diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 5c25f0945a9..d7295bd64b1 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog | |||
| @@ -1,6 +1,11 @@ | |||
| 1 | 2007-07-08 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * files.texi (Magic File Names): Introduce optional parameter | ||
| 4 | CONNECTED for `file-remote-p'. | ||
| 5 | |||
| 1 | 2007-07-07 Michael Albinus <michael.albinus@gmx.de> | 6 | 2007-07-07 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 7 | ||
| 3 | * process.texi (Asynchronous Processes): | 8 | * processes.texi (Asynchronous Processes): |
| 4 | * files.texi (Magic File Names): Add `start-file-process'. | 9 | * files.texi (Magic File Names): Add `start-file-process'. |
| 5 | 10 | ||
| 6 | 2007-06-27 Richard Stallman <rms@gnu.org> | 11 | 2007-06-27 Richard Stallman <rms@gnu.org> |
diff --git a/lispref/files.texi b/lispref/files.texi index 5af77fafc31..eacb641a8bb 100644 --- a/lispref/files.texi +++ b/lispref/files.texi | |||
| @@ -2768,7 +2768,7 @@ nothing and returns @code{nil}. Otherwise it returns the file name | |||
| 2768 | of the local copy file. | 2768 | of the local copy file. |
| 2769 | @end defun | 2769 | @end defun |
| 2770 | 2770 | ||
| 2771 | @defun file-remote-p filename | 2771 | @defun file-remote-p filename &optional connected |
| 2772 | This function tests whether @var{filename} is a remote file. If | 2772 | This function tests whether @var{filename} is a remote file. If |
| 2773 | @var{filename} is local (not remote), the return value is @code{nil}. | 2773 | @var{filename} is local (not remote), the return value is @code{nil}. |
| 2774 | If @var{filename} is indeed remote, the return value is a string that | 2774 | If @var{filename} is indeed remote, the return value is a string that |
| @@ -2777,7 +2777,7 @@ identifies the remote system. | |||
| 2777 | This identifier string can include a host name and a user name, as | 2777 | This identifier string can include a host name and a user name, as |
| 2778 | well as characters designating the method used to access the remote | 2778 | well as characters designating the method used to access the remote |
| 2779 | system. For example, the remote identifier string for the filename | 2779 | system. For example, the remote identifier string for the filename |
| 2780 | @code{/ssh:user@@host:/some/file} is @code{/ssh:user@@host:}. | 2780 | @code{/sudo::/some/file} is @code{/sudo:root@@localhost:}. |
| 2781 | 2781 | ||
| 2782 | If @code{file-remote-p} returns the same identifier for two different | 2782 | If @code{file-remote-p} returns the same identifier for two different |
| 2783 | filenames, that means they are stored on the same file system and can | 2783 | filenames, that means they are stored on the same file system and can |
| @@ -2785,6 +2785,12 @@ be accessed locally with respect to each other. This means, for | |||
| 2785 | example, that it is possible to start a remote process accessing both | 2785 | example, that it is possible to start a remote process accessing both |
| 2786 | files at the same time. Implementors of file handlers need to ensure | 2786 | files at the same time. Implementors of file handlers need to ensure |
| 2787 | this principle is valid. | 2787 | this principle is valid. |
| 2788 | |||
| 2789 | The optional parameter @var{connected}, when passed non-@code{nil}, | ||
| 2790 | triggers an additional check whether the remote system has been | ||
| 2791 | connected already. The function returns then @code{nil} if there is | ||
| 2792 | no corresponding open connection, even if @var{filename} is remote. | ||
| 2793 | This can be used to avoid unnecessary connection attempts. | ||
| 2788 | @end defun | 2794 | @end defun |
| 2789 | 2795 | ||
| 2790 | @defun unhandled-file-name-directory filename | 2796 | @defun unhandled-file-name-directory filename |