Mercurial > hg > xemacs-beta
comparison lisp/efs/efs.el @ 116:9f59509498e1 r20-1b10
Import from CVS: tag r20-1b10
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:23:06 +0200 |
parents | 8619ce7e4c50 |
children | 7d55a9ba150c |
comparison
equal
deleted
inserted
replaced
115:f109f7dabbe2 | 116:9f59509498e1 |
---|---|
1 ;; -*-Emacs-Lisp-*- | 1 ;; -*-Emacs-Lisp-*- |
2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
3 ;; | 3 ;; |
4 ;; File: efs.el | 4 ;; File: efs.el |
5 ;; Release: $efs release: 1.15 $ | 5 ;; Release: $efs release: 1.15 $ |
6 ;; Version: $Revision: 1.4 $ | 6 ;; Version: #Revision: 1.56 $ |
7 ;; RCS: | 7 ;; RCS: |
8 ;; Description: Transparent FTP support for the original GNU Emacs | 8 ;; Description: Transparent FTP support for the original GNU Emacs |
9 ;; from FSF and Lucid Emacs | 9 ;; from FSF and Lucid Emacs |
10 ;; Authors: Andy Norman <ange@hplb.hpl.hp.com>, | 10 ;; Authors: Andy Norman <ange@hplb.hpl.hp.com>, |
11 ;; Sandy Rutherford <sandy@ibm550.sissa.it> | 11 ;; Sandy Rutherford <sandy@ibm550.sissa.it> |
900 ;;; | 900 ;;; |
901 ;;; LCD Archive Entry: | 901 ;;; LCD Archive Entry: |
902 ;;; efs|Andy Norman and Sandy Rutherford | 902 ;;; efs|Andy Norman and Sandy Rutherford |
903 ;;; |ange@hplb.hpl.hp.com and sandy@ibm550.sissa.it | 903 ;;; |ange@hplb.hpl.hp.com and sandy@ibm550.sissa.it |
904 ;;; |transparent FTP Support for GNU Emacs | 904 ;;; |transparent FTP Support for GNU Emacs |
905 ;;; |$Date: 1997/03/22 06:01:58 $|$efs release: 1.15 beta $| | 905 ;;; |$Date: 1997/03/28 02:28:27 $|$efs release: 1.15 beta $| |
906 | 906 |
907 ;;; Host and listing type notation: | 907 ;;; Host and listing type notation: |
908 ;;; | 908 ;;; |
909 ;;; The functions efs-host-type and efs-listing-type, and the | 909 ;;; The functions efs-host-type and efs-listing-type, and the |
910 ;;; variable efs-dired-host-type follow the following conventions | 910 ;;; variable efs-dired-host-type follow the following conventions |
1047 ;;;; ------------------------------------------------------------ | 1047 ;;;; ------------------------------------------------------------ |
1048 | 1048 |
1049 (defconst efs-version | 1049 (defconst efs-version |
1050 (concat (substring "$efs release: 1.15 $" 14 -2) | 1050 (concat (substring "$efs release: 1.15 $" 14 -2) |
1051 "/" | 1051 "/" |
1052 (substring "$Revision: 1.4 $" 11 -2))) | 1052 (substring "#Revision: 1.56 $" 11 -2))) |
1053 | 1053 |
1054 (defconst efs-time-zero 1970) ; we count time from midnight, Jan 1, 1970 GMT. | 1054 (defconst efs-time-zero 1970) ; we count time from midnight, Jan 1, 1970 GMT. |
1055 | 1055 |
1056 (defconst efs-dumb-host-types | 1056 (defconst efs-dumb-host-types |
1057 '(dumb-unix super-dumb-unix vms cms mts ti-twenex ti-explorer dos mvs | 1057 '(dumb-unix super-dumb-unix vms cms mts ti-twenex ti-explorer dos mvs |
3233 (save-excursion (set-buffer (other-buffer))) | 3233 (save-excursion (set-buffer (other-buffer))) |
3234 (set-buffer-modified-p (buffer-modified-p)))) | 3234 (set-buffer-modified-p (buffer-modified-p)))) |
3235 (if efs-ftp-activity-function | 3235 (if efs-ftp-activity-function |
3236 (funcall efs-ftp-activity-function num)))) | 3236 (funcall efs-ftp-activity-function num)))) |
3237 | 3237 |
3238 ;;;###autoload | |
3238 (defun efs-display-ftp-activity () | 3239 (defun efs-display-ftp-activity () |
3239 "Displays the number of active background ftp sessions. | 3240 "Displays the number of active background ftp sessions in the modeline. |
3240 Uses the variable `efs-mode-line-format' to determine how this will be | 3241 Uses the variable `efs-mode-line-format' to determine how this will be |
3241 displayed." | 3242 displayed." |
3242 (interactive) | 3243 (interactive) |
3243 (or (memq 'efs-mode-line-string global-mode-string) | 3244 (or (memq 'efs-mode-line-string global-mode-string) |
3244 (if global-mode-string | 3245 (if global-mode-string |
7839 "$"))) | 7840 "$"))) |
7840 | 7841 |
7841 | 7842 |
7842 ;;; Getting directory listings. | 7843 ;;; Getting directory listings. |
7843 | 7844 |
7844 (defun efs-directory-files (directory &optional full match nosort) | 7845 (defun efs-directory-files (directory &optional full match nosort &rest ignored-for-now) |
7845 ;; Returns directory-files for remote directories. | 7846 ;; Returns directory-files for remote directories. |
7846 ;; NOSORT is a V19 arg. | 7847 ;; NOSORT is a V19 arg. |
7847 (let* ((directory (expand-file-name directory)) | 7848 (let* ((directory (expand-file-name directory)) |
7848 (parsed (efs-ftp-path directory)) | 7849 (parsed (efs-ftp-path directory)) |
7849 (directory (efs-internal-file-name-as-directory | 7850 (directory (efs-internal-file-name-as-directory |
10728 ;;;; ------------------------------------------------------------ | 10729 ;;;; ------------------------------------------------------------ |
10729 | 10730 |
10730 ;;;###autoload | 10731 ;;;###autoload |
10731 (defun efs-file-handler-function (operation &rest args) | 10732 (defun efs-file-handler-function (operation &rest args) |
10732 "Function to call special file handlers for remote files." | 10733 "Function to call special file handlers for remote files." |
10733 (let ((handler (get operation 'efs))) | 10734 (let ((handler (and (if (boundp 'allow-remote-paths) |
10735 allow-remote-paths | |
10736 t) | |
10737 (get operation 'efs)))) | |
10734 (if handler | 10738 (if handler |
10735 (apply handler args) | 10739 (apply handler args) |
10736 (let ((inhibit-file-name-handlers | 10740 (let ((inhibit-file-name-handlers |
10737 (cons 'efs-file-handler-function | 10741 (cons 'efs-file-handler-function |
10738 (and (eq inhibit-file-name-operation operation) | 10742 (and (eq inhibit-file-name-operation operation) |
10740 (inhibit-file-name-operation operation)) | 10744 (inhibit-file-name-operation operation)) |
10741 (apply operation args))))) | 10745 (apply operation args))))) |
10742 | 10746 |
10743 (defun efs-sifn-handler-function (operation &rest args) | 10747 (defun efs-sifn-handler-function (operation &rest args) |
10744 ;; Handler function for substitute-in-file-name | 10748 ;; Handler function for substitute-in-file-name |
10745 (if (eq operation 'substitute-in-file-name) | 10749 (if (and (if (boundp 'allow-remote-paths) |
10750 allow-remote-paths | |
10751 t) | |
10752 (eq operation 'substitute-in-file-name)) | |
10746 (apply 'efs-substitute-in-file-name args) | 10753 (apply 'efs-substitute-in-file-name args) |
10747 (let ((inhibit-file-name-handlers | 10754 (let ((inhibit-file-name-handlers |
10748 (cons 'efs-sifn-handler-function | 10755 (cons 'efs-sifn-handler-function |
10749 (and (eq operation inhibit-file-name-operation) | 10756 (and (eq operation inhibit-file-name-operation) |
10750 inhibit-file-name-handlers))) | 10757 inhibit-file-name-handlers))) |