comparison lisp/efs/efs.el @ 42:8b8b7f3559a2 r19-15b104

Import from CVS: tag r19-15b104
author cvs
date Mon, 13 Aug 2007 08:54:51 +0200
parents 7e54bd776075
children 8d2a9b52c682
comparison
equal deleted inserted replaced
41:5d6df4963a99 42:8b8b7f3559a2
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.56 $ 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>
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.56 $" 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
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)))