diff options
| author | Richard M. Stallman | 1993-06-07 04:51:25 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-06-07 04:51:25 +0000 |
| commit | 724db75f26bd94085efb9a4e969a1f480f3ccf70 (patch) | |
| tree | 6bb4fa42660bab1d2d12480b47afaa893d0ff557 | |
| parent | 340600803e1f13ead4d9c95f916b02a819af8967 (diff) | |
| download | emacs-724db75f26bd94085efb9a4e969a1f480f3ccf70.tar.gz emacs-724db75f26bd94085efb9a4e969a1f480f3ccf70.zip | |
(ange-ftp-real-load): New function.
(ange-ftp-load): New function--handles `load'.
| -rw-r--r-- | lisp/ange-ftp.el | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lisp/ange-ftp.el b/lisp/ange-ftp.el index bbc7c2c0cef..2236db26d5c 100644 --- a/lisp/ange-ftp.el +++ b/lisp/ange-ftp.el | |||
| @@ -856,7 +856,7 @@ SIZE, if supplied, should be a prime number." | |||
| 856 | ;;;; Internal variables. | 856 | ;;;; Internal variables. |
| 857 | ;;;; ------------------------------------------------------------ | 857 | ;;;; ------------------------------------------------------------ |
| 858 | 858 | ||
| 859 | (defconst ange-ftp-version "$Revision: 1.22 $") | 859 | (defconst ange-ftp-version "$Revision: 1.23 $") |
| 860 | 860 | ||
| 861 | (defvar ange-ftp-data-buffer-name " *ftp data*" | 861 | (defvar ange-ftp-data-buffer-name " *ftp data*" |
| 862 | "Buffer name to hold directory listing data received from ftp process.") | 862 | "Buffer name to hold directory listing data received from ftp process.") |
| @@ -3621,7 +3621,15 @@ system TYPE.") | |||
| 3621 | (ange-ftp-copy-file-internal fn1 tmp1 t nil | 3621 | (ange-ftp-copy-file-internal fn1 tmp1 t nil |
| 3622 | (format "Getting %s" fn1)) | 3622 | (format "Getting %s" fn1)) |
| 3623 | tmp1)))) | 3623 | tmp1)))) |
| 3624 | 3624 | ||
| 3625 | (defun ange-ftp-load (file) | ||
| 3626 | (if (ange-ftp-ftp-name file) | ||
| 3627 | (let ((copy (ange-ftp-file-local-copy file))) | ||
| 3628 | (unwind-protect | ||
| 3629 | (load copy) | ||
| 3630 | (delete-file copy))) | ||
| 3631 | (ange-ftp-real-load file))) | ||
| 3632 | |||
| 3625 | ;; Calculate default-unhandled-directory for a given ange-ftp buffer. | 3633 | ;; Calculate default-unhandled-directory for a given ange-ftp buffer. |
| 3626 | (defun ange-ftp-unhandled-file-name-directory (filename) | 3634 | (defun ange-ftp-unhandled-file-name-directory (filename) |
| 3627 | (file-name-directory ange-ftp-tmp-name-template)) | 3635 | (file-name-directory ange-ftp-tmp-name-template)) |
| @@ -3783,6 +3791,7 @@ NEWNAME should be the name to give the new compressed or uncompressed file.") | |||
| 3783 | (put 'file-name-sans-versions 'ange-ftp 'ange-ftp-file-name-sans-versions) | 3791 | (put 'file-name-sans-versions 'ange-ftp 'ange-ftp-file-name-sans-versions) |
| 3784 | (put 'dired-uncache 'ange-ftp 'ange-ftp-dired-uncache) | 3792 | (put 'dired-uncache 'ange-ftp 'ange-ftp-dired-uncache) |
| 3785 | (put 'dired-compress-file 'ange-ftp 'ange-ftp-dired-compress-file) | 3793 | (put 'dired-compress-file 'ange-ftp 'ange-ftp-dired-compress-file) |
| 3794 | (put 'load 'ange-ftp 'ange-ftp-load) | ||
| 3786 | 3795 | ||
| 3787 | ;; Turn off truename processing to save time. | 3796 | ;; Turn off truename processing to save time. |
| 3788 | ;; Treat each name as its own truename. | 3797 | ;; Treat each name as its own truename. |
| @@ -3876,6 +3885,9 @@ NEWNAME should be the name to give the new compressed or uncompressed file.") | |||
| 3876 | (defun ange-ftp-real-shell-command (&rest args) | 3885 | (defun ange-ftp-real-shell-command (&rest args) |
| 3877 | (let (file-name-handler-alist) | 3886 | (let (file-name-handler-alist) |
| 3878 | (apply 'shell-command args))) | 3887 | (apply 'shell-command args))) |
| 3888 | (defun ange-ftp-real-load (&rest args) | ||
| 3889 | (let (file-name-handler-alist) | ||
| 3890 | (apply 'load args))) | ||
| 3879 | 3891 | ||
| 3880 | ;; Here we support using dired on remote hosts. | 3892 | ;; Here we support using dired on remote hosts. |
| 3881 | ;; I have turned off the support for using dired on foreign directory formats. | 3893 | ;; I have turned off the support for using dired on foreign directory formats. |