Function: ange-ftp-load

ange-ftp-load is a byte-compiled function defined in ange-ftp.el.gz.

Signature

(ange-ftp-load FILE &optional NOERROR NOMESSAGE NOSUFFIX)

Source Code

;; Defined in /usr/src/emacs/lisp/net/ange-ftp.el.gz
(defun ange-ftp-load (file &optional noerror nomessage nosuffix)
  (if (ange-ftp-ftp-name file)
      (let ((tryfiles (if nosuffix
			  (list file)
			(list (concat file ".elc") (concat file ".el") file)))
	    ;; make sure there are no references to temp files
	    (load-force-doc-strings t)
	    copy)
	(while (and tryfiles (not copy))
	  (catch 'ftp-error
	    (let ((ange-ftp-waiting-flag t))
	      (condition-case nil
		  (setq copy (ange-ftp-file-local-copy (car tryfiles)))
		(ftp-error nil))))
	  (setq tryfiles (cdr tryfiles)))
	(if copy
	    (unwind-protect
		(funcall 'load copy noerror nomessage nosuffix)
	      (delete-file copy))
	  (or noerror
	      (signal 'file-error (list "Cannot open load file" file)))
	  nil))
    (ange-ftp-real-load file noerror nomessage nosuffix)))