changeset 81940:9c550f0c81fa

* files.texi (Magic File Names): Introduce optional parameter IDENTIFICATION for `file-remote-p'.
author Michael Albinus <michael.albinus@gmx.de>
date Tue, 17 Jul 2007 21:29:20 +0000
parents 7cd8ee60cf68
children bff8a71eeb05
files lispref/ChangeLog lispref/files.texi
diffstat 2 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lispref/ChangeLog	Tue Jul 17 21:16:36 2007 +0000
+++ b/lispref/ChangeLog	Tue Jul 17 21:29:20 2007 +0000
@@ -1,3 +1,8 @@
+2007-07-17  Michael Albinus  <michael.albinus@gmx.de>
+
+	* files.texi (Magic File Names): Introduce optional parameter
+	IDENTIFICATION for `file-remote-p'.
+
 2007-07-14  Richard Stallman  <rms@gnu.org>
 
 	* control.texi (Handling Errors): Document `debug' in handler list.
--- a/lispref/files.texi	Tue Jul 17 21:16:36 2007 +0000
+++ b/lispref/files.texi	Tue Jul 17 21:29:20 2007 +0000
@@ -2768,7 +2768,7 @@
 of the local copy file.
 @end defun
 
-@defun file-remote-p filename &optional connected
+@defun file-remote-p filename &optional identification connected
 This function tests whether @var{filename} is a remote file.  If
 @var{filename} is local (not remote), the return value is @code{nil}.
 If @var{filename} is indeed remote, the return value is a string that
@@ -2786,6 +2786,13 @@
 files at the same time.  Implementors of file handlers need to ensure
 this principle is valid.
 
+@var{identification} specifies which part of the identifier shall be
+returned as string.  @var{identification} can be the symbol
+@code{method}, @code{user} or @code{host}; any other value is handled
+like @code{nil} and means to return the complete identifier string.
+In the example above, the remote @code{user} identifier string would
+be @code{root}.
+
 If @var{connected} is non-@code{nil}, this function returns @code{nil}
 even if @var{filename} is remote, if Emacs has no network connection
 to its host.  This is useful when you want to avoid the delay of