From c0c6cd2d5d7af82ddfd4d8d080d0aa8d7882d293 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 14 Dec 2020 19:30:01 +0100 Subject: 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. --- src/fileio.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') 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 -- cgit v1.2.1