aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1994-02-07 23:38:22 +0000
committerKarl Heuer1994-02-07 23:38:22 +0000
commit1a7ffe17b7e768c3c660f3a3fc419a47943df71f (patch)
tree35f4e404433d45a5975433843eeeb4e94434001a
parente4f794ed3af1fbadf21d79b9cb60a035993658fc (diff)
downloademacs-1a7ffe17b7e768c3c660f3a3fc419a47943df71f.tar.gz
emacs-1a7ffe17b7e768c3c660f3a3fc419a47943df71f.zip
(ange-ftp-load): Honor the NOERROR and NOSUFFIX flags.
-rw-r--r--lisp/ange-ftp.el24
1 files changed, 17 insertions, 7 deletions
diff --git a/lisp/ange-ftp.el b/lisp/ange-ftp.el
index 8f535c43010..c4fa476ea21 100644
--- a/lisp/ange-ftp.el
+++ b/lisp/ange-ftp.el
@@ -857,7 +857,7 @@ SIZE, if supplied, should be a prime number."
857;;;; Internal variables. 857;;;; Internal variables.
858;;;; ------------------------------------------------------------ 858;;;; ------------------------------------------------------------
859 859
860(defconst ange-ftp-version "$Revision: 1.39 $") 860(defconst ange-ftp-version "$Revision: 1.40 $")
861 861
862(defvar ange-ftp-data-buffer-name " *ftp data*" 862(defvar ange-ftp-data-buffer-name " *ftp data*"
863 "Buffer name to hold directory listing data received from ftp process.") 863 "Buffer name to hold directory listing data received from ftp process.")
@@ -3641,13 +3641,23 @@ system TYPE.")
3641 (format "Getting %s" fn1)) 3641 (format "Getting %s" fn1))
3642 tmp1)))) 3642 tmp1))))
3643 3643
3644(defun ange-ftp-load (file &rest args) 3644(defun ange-ftp-load (file &optional noerror nomessage nosuffix)
3645 (if (ange-ftp-ftp-name file) 3645 (if (ange-ftp-ftp-name file)
3646 (let ((copy (ange-ftp-file-local-copy file))) 3646 (let ((tryfiles (if nosuffix
3647 (unwind-protect 3647 (list file)
3648 (apply 'load copy args) 3648 (list (concat file ".elc") (concat file ".el") file)))
3649 (delete-file copy))) 3649 copy)
3650 (apply 'ange-ftp-real-load file args))) 3650 (while (and tryfiles (not copy))
3651 (condition-case error
3652 (setq copy (ange-ftp-file-local-copy (car tryfiles)))
3653 (ftp-error nil)))
3654 (if copy
3655 (unwind-protect
3656 (funcall 'load copy noerror nomessage nosuffix)
3657 (delete-file copy))
3658 (or noerror
3659 (signal 'file-error (list "Cannot open load file" file)))))
3660 (ange-ftp-real-load file noerror nomessage nosuffix)))
3651 3661
3652;; Calculate default-unhandled-directory for a given ange-ftp buffer. 3662;; Calculate default-unhandled-directory for a given ange-ftp buffer.
3653(defun ange-ftp-unhandled-file-name-directory (filename) 3663(defun ange-ftp-unhandled-file-name-directory (filename)