Commit 88b41c40 authored by Michael Albinus's avatar Michael Albinus

Use "file name handler" consequently

* doc/lispref/files.texi:
* doc/lispref/processes.texi:
* doc/misc/ediff.texi:
* lisp/simple.el:
* lisp/vc/ediff-ptch.el:
* src/buffer.c:
* src/dired.c:
* src/fileio.c:
* src/image.c:
* src/insdel.c:
* src/w32fns.c: Use "file name handler" consequently.
parent 452d0c52
......@@ -3067,7 +3067,7 @@ expression to define the class of names (all those that match the
regular expression), plus a handler that implements all the primitive
Emacs file operations for file names that match.
@cindex file handler
@cindex file name handler
@vindex file-name-handler-alist
The variable @code{file-name-handler-alist} holds a list of handlers,
together with regular expressions that determine when to apply each
......@@ -3354,8 +3354,8 @@ If @code{file-remote-p} returns the same identifier for two different
filenames, that means they are stored on the same file system and can
be accessed locally with respect to each other. This means, for
example, that it is possible to start a remote process accessing both
files at the same time. Implementers of file handlers need to ensure
this principle is valid.
files at the same time. Implementers of file name 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
......
......@@ -423,27 +423,27 @@ be found in the definition of the @code{insert-directory} function:
@defun process-file program &optional infile buffer display &rest args
This function processes files synchronously in a separate process. It
is similar to @code{call-process}, but may invoke a file handler based
on the value of the variable @code{default-directory}, which specifies
the current working directory of the subprocess.
is similar to @code{call-process}, but may invoke a file name handler
based on the value of the variable @code{default-directory}, which
specifies the current working directory of the subprocess.
The arguments are handled in almost the same way as for
@code{call-process}, with the following differences:
Some file handlers may not support all combinations and forms of the
Some file name handlers may not support all combinations and forms of the
arguments @var{infile}, @var{buffer}, and @var{display}. For example,
some file handlers might behave as if @var{display} were @code{nil},
some file name handlers might behave as if @var{display} were @code{nil},
regardless of the value actually passed. As another example, some
file handlers might not support separating standard output and error
file name handlers might not support separating standard output and error
output by way of the @var{buffer} argument.
If a file handler is invoked, it determines the program to run based
If a file name handler is invoked, it determines the program to run based
on the first argument @var{program}. For instance, suppose that a
handler for remote files is invoked. Then the path that is used for
searching for the program might be different from @code{exec-path}.
The second argument @var{infile} may invoke a file handler. The file
handler could be different from the handler chosen for the
The second argument @var{infile} may invoke a file name handler. The file
name handler could be different from the handler chosen for the
@code{process-file} function itself. (For example,
@code{default-directory} could be on one remote host, and
@var{infile} on a different remote host. Or @code{default-directory}
......@@ -468,7 +468,7 @@ remote files.
By default, this variable is always set to @code{t}, meaning that a
call of @code{process-file} could potentially change any file on a
remote host. When set to @code{nil}, a file handler could optimize
remote host. When set to @code{nil}, a file name handler could optimize
its behavior with respect to remote file attribute caching.
You should only ever change this variable with a let-binding; never
......@@ -821,7 +821,7 @@ subprocess running @var{program} in it, and returns its process
object.
The difference from @code{start-process} is that this function may
invoke a file handler based on the value of @code{default-directory}.
invoke a file name handler based on the value of @code{default-directory}.
This handler ought to run @var{program}, perhaps on the local host,
perhaps on a remote host that corresponds to @code{default-directory}.
In the latter case, the local part of @code{default-directory} becomes
......@@ -830,13 +830,13 @@ the working directory of the process.
This function does not try to invoke file name handlers for
@var{program} or for the rest of @var{args}.
Depending on the implementation of the file handler, it might not be
Depending on the implementation of the file name handler, it might not be
possible to apply @code{process-filter} or @code{process-sentinel} to
the resulting process object. @xref{Filter Functions}, and @ref{Sentinels}.
@c FIXME Can we find a better example (i.e., a more modern function
@c that is actually documented).
Some file handlers may not support @code{start-file-process} (for
Some file name handlers may not support @code{start-file-process} (for
example the function @code{ange-ftp-hook-function}). In such cases,
this function does nothing and returns @code{nil}.
@end defun
......
......@@ -1147,7 +1147,7 @@ file (unlike what the @code{patch} utility would usually do). Instead, the
source file retains its name and the result of applying the patch is placed
in a temporary file that has the suffix @file{_patched} attached.
Generally, this applies to files that are handled using black magic, such
as special file handlers (ange-ftp and some compression and encryption
as special file name handlers (ange-ftp and some compression and encryption
packages also use this method).
Regular files are treated by the @code{patch} utility in the usual manner,
......
......@@ -3893,17 +3893,17 @@ interactively, this is t."
(defun process-file (program &optional infile buffer display &rest args)
"Process files synchronously in a separate process.
Similar to `call-process', but may invoke a file handler based on
Similar to `call-process', but may invoke a file name handler based on
`default-directory'. The current working directory of the
subprocess is `default-directory'.
File names in INFILE and BUFFER are handled normally, but file
names in ARGS should be relative to `default-directory', as they
are passed to the process verbatim. (This is a difference to
`call-process' which does not support file handlers for INFILE
`call-process' which does not support file name handlers for INFILE
and BUFFER.)
Some file handlers might not support all variants, for example
Some file name handlers might not support all variants, for example
they might behave as if DISPLAY was nil, regardless of the actual
value passed."
(let ((fh (find-file-name-handler default-directory 'process-file))
......@@ -3927,7 +3927,7 @@ value passed."
By default, this variable is always set to t, meaning that a
call of `process-file' could potentially change any file on a
remote host. When set to nil, a file handler could optimize
remote host. When set to nil, a file name handler could optimize
its behavior with respect to remote file attribute caching.
You should only ever change this variable with a let-binding;
......@@ -3936,7 +3936,7 @@ never with `setq'.")
(defun start-file-process (name buffer program &rest program-args)
"Start a program in a subprocess. Return the process object for it.
Similar to `start-process', but may invoke a file handler based on
Similar to `start-process', but may invoke a file name handler based on
`default-directory'. See Info node `(elisp)Magic File Names'.
This handler ought to run PROGRAM, perhaps on the local host,
......@@ -3945,7 +3945,7 @@ In the latter case, the local part of `default-directory' becomes
the working directory of the process.
PROGRAM and PROGRAM-ARGS might be file names. They are not
objects of file handler invocation. File handlers might not
objects of file name handler invocation. File name handlers might not
support pty association, if PROGRAM is nil."
(let ((fh (find-file-name-handler default-directory 'start-file-process)))
(if fh (apply fh 'start-file-process name buffer program program-args)
......
......@@ -681,7 +681,7 @@ optional argument, then use it."
(error
"Ediff doesn't take the -V option in `ediff-patch-options'--sorry"))
;; Make a temp file, if source-filename has a magic file handler (or if
;; Make a temp file, if source-filename has a magic file name handler (or if
;; it is handled via auto-mode-alist and similar magic).
;; Check if there is a buffer visiting source-filename and if they are in
;; sync; arrange for the deletion of temp file.
......@@ -691,7 +691,7 @@ optional argument, then use it."
;; Check if source file name has triggered black magic, such as file name
;; handlers or auto mode alist, and make a note of it.
;; true-source-filename should be either the original name or a
;; temporary file where we put the after-product of the file handler.
;; temporary file where we put the after-product of the file name handler.
(setq file-name-magic-p (not (equal (file-truename true-source-filename)
(file-truename source-filename))))
......
......@@ -466,7 +466,7 @@ See also `find-buffer-visiting'. */)
filename = Fexpand_file_name (filename, Qnil);
/* If the file name has special constructs in it,
call the corresponding file handler. */
call the corresponding file name handler. */
handler = Ffind_file_name_handler (filename, Qget_file_buffer);
if (!NILP (handler))
{
......
......@@ -333,7 +333,7 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable.
directory = Fexpand_file_name (directory, Qnil);
/* If the file name has special constructs in it,
call the corresponding file handler. */
call the corresponding file name handler. */
handler = Ffind_file_name_handler (directory, Qdirectory_files);
if (!NILP (handler))
return call5 (handler, Qdirectory_files, directory,
......@@ -368,7 +368,7 @@ which see. */)
directory = Fexpand_file_name (directory, Qnil);
/* If the file name has special constructs in it,
call the corresponding file handler. */
call the corresponding file name handler. */
handler = Ffind_file_name_handler (directory, Qdirectory_files_and_attributes);
if (!NILP (handler))
return call6 (handler, Qdirectory_files_and_attributes,
......@@ -403,13 +403,13 @@ is matched against file and directory names relative to DIRECTORY. */)
directory = Fexpand_file_name (directory, Qnil);
/* If the directory name has special constructs in it,
call the corresponding file handler. */
call the corresponding file name handler. */
handler = Ffind_file_name_handler (directory, Qfile_name_completion);
if (!NILP (handler))
return call4 (handler, Qfile_name_completion, file, directory, predicate);
/* If the file name has special constructs in it,
call the corresponding file handler. */
call the corresponding file name handler. */
handler = Ffind_file_name_handler (file, Qfile_name_completion);
if (!NILP (handler))
return call4 (handler, Qfile_name_completion, file, directory, predicate);
......@@ -431,13 +431,13 @@ is matched against file and directory names relative to DIRECTORY. */)
directory = Fexpand_file_name (directory, Qnil);
/* If the directory name has special constructs in it,
call the corresponding file handler. */
call the corresponding file name handler. */
handler = Ffind_file_name_handler (directory, Qfile_name_all_completions);
if (!NILP (handler))
return call3 (handler, Qfile_name_all_completions, file, directory);
/* If the file name has special constructs in it,
call the corresponding file handler. */
call the corresponding file name handler. */
handler = Ffind_file_name_handler (file, Qfile_name_all_completions);
if (!NILP (handler))
return call3 (handler, Qfile_name_all_completions, file, directory);
......@@ -901,11 +901,12 @@ so last access time will always be midnight of that day. */)
return Qnil;
/* If the file name has special constructs in it,
call the corresponding file handler. */
call the corresponding file name handler. */
handler = Ffind_file_name_handler (filename, Qfile_attributes);
if (!NILP (handler))
{ /* Only pass the extra arg if it is used to help backward compatibility
with old file handlers which do not implement the new arg. --Stef */
{ /* Only pass the extra arg if it is used to help backward
compatibility with old file name handlers which do not
implement the new arg. --Stef */
if (NILP (id_format))
return call2 (handler, Qfile_attributes, filename);
else
......
This diff is collapsed.
......@@ -2340,10 +2340,10 @@ x_find_image_fd (Lisp_Object file, int *pfd)
file_found = ENCODE_FILE (file_found);
if (fd == -2)
{
/* The file exists locally, but has a file handler. (This
happens, e.g., under Auto Image File Mode.) 'openp'
didn't open the file, so we should, because the caller
expects that. */
/* The file exists locally, but has a file name handler.
(This happens, e.g., under Auto Image File Mode.)
'openp' didn't open the file, so we should, because the
caller expects that. */
fd = emacs_open (SSDATA (file_found), O_RDONLY, 0);
}
}
......
......@@ -2255,7 +2255,7 @@ DEFUN ("combine-after-change-execute", Fcombine_after_change_execute,
/* It is rare for combine_after_change_buffer to be invalid, but
possible. It can happen when combine-after-change-calls is
non-nil, and insertion calls a file handler (e.g. through
non-nil, and insertion calls a file name handler (e.g. through
lock_file) which scribbles into a temp file -- cyd */
if (!BUFFERP (combine_after_change_buffer)
|| !BUFFER_LIVE_P (XBUFFER (combine_after_change_buffer)))
......
......@@ -8219,7 +8219,7 @@ a ShowWindow flag:
URL, for example. So we make it absolute only if it is an
existing file; if it is a file that does not exist, tough. */
absdoc = Fexpand_file_name (document, Qnil);
/* Don't call file handlers for file-exists-p, since they might
/* Don't call file name handlers for file-exists-p, since they might
attempt to access the file, which could fail or produce undesired
consequences, see bug#16558 for an example. */
handler = Ffind_file_name_handler (absdoc, Qfile_exists_p);
......@@ -9097,7 +9097,7 @@ DEFUN ("file-system-info", Ffile_system_info, Sfile_system_info, 1, 1, 0,
encoded = ENCODE_FILE (filename);
/* If the file name has special constructs in it,
call the corresponding file handler. */
call the corresponding file name handler. */
Lisp_Object handler = Ffind_file_name_handler (encoded, Qfile_system_info);
if (!NILP (handler))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment