[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-30 0218fb21437: Adapt file-remote-p doc
From: |
Michael Albinus |
Subject: |
emacs-30 0218fb21437: Adapt file-remote-p doc |
Date: |
Fri, 19 Jul 2024 12:30:10 -0400 (EDT) |
branch: emacs-30
commit 0218fb214376555df52188be4afee16249e3639c
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>
Adapt file-remote-p doc
* doc/lispref/files.texi (Magic File Names): Adapt file-remote-p.
* lisp/files.el (file-remote-p): Adapt docstring.
---
doc/lispref/files.texi | 16 ++++++++++++----
lisp/files.el | 11 ++++++++---
2 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index 9e7aeeecec8..1a8f3812f1e 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -3624,10 +3624,18 @@ 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}.
+@code{method}, @code{user}, @code{host} or @code{localname}; 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 the remote @var{file} does not contain a method, a user name, or a
+host name, the respective default value is returned. The string
+returned for @var{identification} @code{localname} can differ depending
+on whether there is an existing connection. File name handler specific
+implementations could support further @var{identification} symbols;
+@xref{Top, Tramp, Tramp, tramp}, for example, knows also the @code{hop}
+symbol.
If @var{connected} is non-@code{nil}, this function returns @code{nil}
even if @var{filename} is remote, if Emacs has no network connection
diff --git a/lisp/files.el b/lisp/files.el
index ca2d5b30cb4..73ad85ce854 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -1298,9 +1298,14 @@ any that are missing.
IDENTIFICATION can specify which part of the identification to
return. IDENTIFICATION can be the symbol `method', `user',
`host', or `localname'. Any other value is handled like nil and
-means to return the complete identification. The string returned
-for IDENTIFICATION `localname' can differ depending on whether
-there is an existing connection.
+means to return the complete identification.
+
+If the remote FILE does not contain a method, a user name, or a host
+name, the respective default value is returned. The string returned for
+IDENTIFICATION `localname' can differ depending on whether there is an
+existing connection. File name handler specific implementations could
+support further IDENTIFICATION symbols; Tramp, for example, knows also
+the `hop' symbol.
If CONNECTED is non-nil, return an identification only if FILE is
located on a remote system and a connection is established to
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-30 0218fb21437: Adapt file-remote-p doc,
Michael Albinus <=