diff options
Diffstat (limited to 'compat.texi')
| -rw-r--r-- | compat.texi | 72 |
1 files changed, 37 insertions, 35 deletions
diff --git a/compat.texi b/compat.texi index 1d5a4ff..37e9d52 100644 --- a/compat.texi +++ b/compat.texi @@ -653,6 +653,41 @@ It should be somewhat more efficient on larger buffers than @end defun @c copied from lispref/files.texi +@defun file-name-quoted-p name +This macro returns non-@code{nil}, when @var{name} is quoted with the +prefix @samp{/:}. If @var{name} is a remote file name, the local part +of @var{name} is checked. + +@xref{File Name Expansion,,,elisp}. +@end defun + +@c copied from lispref/files.texi +@defun file-name-quote name +This macro adds the quotation prefix @samp{/:} to the file @var{name}. +For a local file @var{name}, it prefixes @var{name} with @samp{/:}. If +@var{name} is a remote file name, the local part of @var{name} +(@pxref{Magic File Names,,,elisp}) is quoted. If @var{name} is already +a quoted file name, @var{name} is returned unchanged. + +@example +@group +(substitute-in-file-name (compat-call file-name-quote "bar/~/foo")) @result{} + "/:bar/~/foo" +@end group + +@group +(substitute-in-file-name (compat-call file-name-quote "/ssh:host:bar/~/foo")) + @result{} "/ssh:host:/:bar/~/foo" +@end group +@end example + +The macro cannot be used to suppress file name handlers from magic file +names (@pxref{Magic File Names,,,elisp}). + +@xref{File Name Expansion,,,elisp}. +@end defun + +@c copied from lispref/files.texi @defun make-nearby-temp-file prefix &optional dir-flag suffix This function is similar to @code{make-temp-file}, but it creates a temporary file as close as possible to @code{default-directory}. If @@ -922,47 +957,14 @@ The compatibility version handles the optional arguments @var{trim-left} and @var{trim-right}. @end defun -@c copied from lispref/files.texi -@defun compat-call@ file-name-quoted-p name -This macro returns non-@code{nil}, when @var{name} is quoted with the -prefix @samp{/:}. If @var{name} is a remote file name, the local part -of @var{name} is checked. - -@xref{File Name Expansion,,,elisp}. -@end defun - -@c copied from lispref/files.texi -@defun compat-call@ file-name-quote name -This macro adds the quotation prefix @samp{/:} to the file @var{name}. -For a local file @var{name}, it prefixes @var{name} with @samp{/:}. If -@var{name} is a remote file name, the local part of @var{name} -(@pxref{Magic File Names,,,elisp}) is quoted. If @var{name} is already -a quoted file name, @var{name} is returned unchanged. - -@example -@group -(substitute-in-file-name (compat-call file-name-quote "bar/~/foo")) @result{} - "/:bar/~/foo" -@end group - -@group -(substitute-in-file-name (compat-call file-name-quote "/ssh:host:bar/~/foo")) - @result{} "/ssh:host:/:bar/~/foo" -@end group -@end example - -The macro cannot be used to suppress file name handlers from magic file -names (@pxref{Magic File Names,,,elisp}). - -@xref{File Name Expansion,,,elisp}. -@end defun - @subsection Missing Definitions Compat does not provide support for the following Lisp features implemented in 26.1: @itemize @item +The function @code{file-name-unquote}. +@item The function @code{func-arity}. @item The function @code{secure-hash-algorithms}. |
