diff options
| author | Richard M. Stallman | 1997-01-18 06:08:37 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-01-18 06:08:37 +0000 |
| commit | 2c7f9082acaacc5ffa29f017ce5e9e22e7aca733 (patch) | |
| tree | 36037098fb2de60c3d24a2865e26bd9d7d99a946 /lisp | |
| parent | b8cab0060c556213a8bcd7e776035d7246faf9b4 (diff) | |
| download | emacs-2c7f9082acaacc5ffa29f017ce5e9e22e7aca733.tar.gz emacs-2c7f9082acaacc5ffa29f017ce5e9e22e7aca733.zip | |
(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')
| -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.") | |||
| 3375 | (progn | 3375 | (progn |
| 3376 | (and temp1 (ange-ftp-del-tmp-name temp1)) | 3376 | (and temp1 (ange-ftp-del-tmp-name temp1)) |
| 3377 | (or cont | 3377 | (or cont |
| 3378 | (signal 'ftp-error (list "Opening input file" | 3378 | (if ange-ftp-waiting-flag |
| 3379 | (format "FTP Error: \"%s\"" line) | 3379 | (throw 'ftp-error t) |
| 3380 | filename))))) | 3380 | (signal 'ftp-error |
| 3381 | (list "Opening input file" | ||
| 3382 | (format "FTP Error: \"%s\"" line) | ||
| 3383 | filename)))))) | ||
| 3381 | ;; cleanup | 3384 | ;; cleanup |
| 3382 | (if binary | 3385 | (if binary |
| 3383 | (ange-ftp-set-ascii-mode f-host f-user)))) | 3386 | (ange-ftp-set-ascii-mode f-host f-user)))) |
| @@ -3438,10 +3441,12 @@ system TYPE.") | |||
| 3438 | (progn | 3441 | (progn |
| 3439 | (or result | 3442 | (or result |
| 3440 | (or cont | 3443 | (or cont |
| 3441 | (signal 'ftp-error | 3444 | (if ange-ftp-waiting-flag |
| 3442 | (list "Opening output file" | 3445 | (throw 'ftp-error t) |
| 3443 | (format "FTP Error: \"%s\"" line) | 3446 | (signal 'ftp-error |
| 3444 | newname)))) | 3447 | (list "Opening output file" |
| 3448 | (format "FTP Error: \"%s\"" line) | ||
| 3449 | newname))))) | ||
| 3445 | 3450 | ||
| 3446 | (ange-ftp-add-file-entry newname)) | 3451 | (ange-ftp-add-file-entry newname)) |
| 3447 | 3452 | ||
| @@ -3747,6 +3752,8 @@ system TYPE.") | |||
| 3747 | (format "Getting %s" fn1)) | 3752 | (format "Getting %s" fn1)) |
| 3748 | tmp1)))) | 3753 | tmp1)))) |
| 3749 | 3754 | ||
| 3755 | (defvar ange-ftp-waiting-flag nil) | ||
| 3756 | |||
| 3750 | (defun ange-ftp-load (file &optional noerror nomessage nosuffix) | 3757 | (defun ange-ftp-load (file &optional noerror nomessage nosuffix) |
| 3751 | (if (ange-ftp-ftp-name file) | 3758 | (if (ange-ftp-ftp-name file) |
| 3752 | (let ((tryfiles (if nosuffix | 3759 | (let ((tryfiles (if nosuffix |
| @@ -3754,9 +3761,11 @@ system TYPE.") | |||
| 3754 | (list (concat file ".elc") (concat file ".el") file))) | 3761 | (list (concat file ".elc") (concat file ".el") file))) |
| 3755 | copy) | 3762 | copy) |
| 3756 | (while (and tryfiles (not copy)) | 3763 | (while (and tryfiles (not copy)) |
| 3757 | (condition-case error | 3764 | (catch 'ftp-error |
| 3758 | (setq copy (ange-ftp-file-local-copy (car tryfiles))) | 3765 | (let ((ange-ftp-waiting-flag t)) |
| 3759 | (ftp-error nil)) | 3766 | (condition-case error |
| 3767 | (setq copy (ange-ftp-file-local-copy (car tryfiles))) | ||
| 3768 | (ftp-error nil)))) | ||
| 3760 | (setq tryfiles (cdr tryfiles))) | 3769 | (setq tryfiles (cdr tryfiles))) |
| 3761 | (if copy | 3770 | (if copy |
| 3762 | (unwind-protect | 3771 | (unwind-protect |