diff options
author | Richard M. Stallman <rms@gnu.org> | 1997-01-18 06:08:37 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1997-01-18 06:08:37 +0000 |
commit | d73a3a218076ffc9ab7692030b136112e8c951a2 (patch) | |
tree | 82902cbadcd8f2f780dfac20210940f95f47d9d2 /lisp/ange-ftp.el | |
parent | bb5fa15c52f392ca91ca03d8ca1a9ffab26a2e2d (diff) | |
download | emacs-d73a3a218076ffc9ab7692030b136112e8c951a2.tar.gz |
(ange-ftp-waiting-flag): New variable.
(ange-ftp-load): Bind that to t, and catch ftp-error.
(ange-ftp-cf2, ange-ftp-cf1): If ange-ftp-waiting-flag is t,
throw instead of signaling an error.
Diffstat (limited to 'lisp/ange-ftp.el')
-rw-r--r-- | lisp/ange-ftp.el | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/lisp/ange-ftp.el b/lisp/ange-ftp.el index 137e63abd79..215463bbf0b 100644 --- a/lisp/ange-ftp.el +++ b/lisp/ange-ftp.el @@ -3375,9 +3375,12 @@ system TYPE.") (progn (and temp1 (ange-ftp-del-tmp-name temp1)) (or cont - (signal 'ftp-error (list "Opening input file" - (format "FTP Error: \"%s\"" line) - filename))))) + (if ange-ftp-waiting-flag + (throw 'ftp-error t) + (signal 'ftp-error + (list "Opening input file" + (format "FTP Error: \"%s\"" line) + filename)))))) ;; cleanup (if binary (ange-ftp-set-ascii-mode f-host f-user)))) @@ -3438,10 +3441,12 @@ system TYPE.") (progn (or result (or cont - (signal 'ftp-error - (list "Opening output file" - (format "FTP Error: \"%s\"" line) - newname)))) + (if ange-ftp-waiting-flag + (throw 'ftp-error t) + (signal 'ftp-error + (list "Opening output file" + (format "FTP Error: \"%s\"" line) + newname))))) (ange-ftp-add-file-entry newname)) @@ -3747,6 +3752,8 @@ system TYPE.") (format "Getting %s" fn1)) tmp1)))) +(defvar ange-ftp-waiting-flag nil) + (defun ange-ftp-load (file &optional noerror nomessage nosuffix) (if (ange-ftp-ftp-name file) (let ((tryfiles (if nosuffix @@ -3754,9 +3761,11 @@ system TYPE.") (list (concat file ".elc") (concat file ".el") file))) copy) (while (and tryfiles (not copy)) - (condition-case error - (setq copy (ange-ftp-file-local-copy (car tryfiles))) - (ftp-error nil)) + (catch 'ftp-error + (let ((ange-ftp-waiting-flag t)) + (condition-case error + (setq copy (ange-ftp-file-local-copy (car tryfiles))) + (ftp-error nil)))) (setq tryfiles (cdr tryfiles))) (if copy (unwind-protect |