summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2020-12-14 19:30:01 +0100
committerMichael Albinus <michael.albinus@gmx.de>2020-12-14 19:30:01 +0100
commitc0c6cd2d5d7af82ddfd4d8d080d0aa8d7882d293 (patch)
tree176900038c02b3fcc984969464e51ce4aeb3f138 /src
parent47a854bf24c8a36bf1e8ac32c8b5c9ebcba1d90a (diff)
Add 'remote-file-error' for Tramp
* doc/lispref/errors.texi (Standard Errors): Add 'remote-file-error'. * etc/NEWS: Mention 'remote-file-error'. * lisp/net/ange-ftp.el (ftp-error): Add error condition `remote-file-error'. * lisp/net/tramp-cmds.el (tramp-cleanup-all-connections): Do not set `tramp-locked'. * lisp/net/tramp-compat.el (remote-file-error): Define if it doesn't exist. * lisp/net/tramp-sh.el (tramp-timeout-session): Check for "locked" property. (tramp-maybe-open-connection): Simplify. * lisp/net/tramp.el (tramp-locked, tramp-locker): Remove them. (tramp-file-name-handler): Do not set them. (with-tramp-locked-connection): New defmacro. (tramp-accept-process-output, tramp-send-string): Use it. * src/fileio.c (Qremote_file_error): New error symbol. * test/lisp/net/tramp-tests.el (tramp-test43-asynchronous-requests): Adapt test. Remove :unstable tag.
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 702c1438283..c97f4daf20c 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -6259,6 +6259,7 @@ syms_of_fileio (void)
DEFSYM (Qfile_date_error, "file-date-error");
DEFSYM (Qfile_missing, "file-missing");
DEFSYM (Qfile_notify_error, "file-notify-error");
+ DEFSYM (Qremote_file_error, "remote-file-error");
DEFSYM (Qexcl, "excl");
DEFVAR_LISP ("file-name-coding-system", Vfile_name_coding_system,
@@ -6320,6 +6321,11 @@ behaves as if file names were encoded in `utf-8'. */);
Fput (Qfile_notify_error, Qerror_message,
build_pure_c_string ("File notification error"));
+ Fput (Qremote_file_error, Qerror_conditions,
+ Fpurecopy (list3 (Qremote_file_error, Qfile_error, Qerror)));
+ Fput (Qremote_file_error, Qerror_message,
+ build_pure_c_string ("Remote file error"));
+
DEFVAR_LISP ("file-name-handler-alist", Vfile_name_handler_alist,
doc: /* Alist of elements (REGEXP . HANDLER) for file names handled specially.
If a file name matches REGEXP, all I/O on that file is done by calling