Mercurial > hg > xemacs-beta
diff lisp/efs/efs-dump.el @ 116:9f59509498e1 r20-1b10
Import from CVS: tag r20-1b10
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:23:06 +0200 |
parents | 8b8b7f3559a2 |
children | 56c54cf7c5b6 |
line wrap: on
line diff
--- a/lisp/efs/efs-dump.el Mon Aug 13 09:21:56 2007 +0200 +++ b/lisp/efs/efs-dump.el Mon Aug 13 09:23:06 2007 +0200 @@ -3,7 +3,7 @@ ;; ;; File: efs-dump.el ;; Release: $efs release: 1.15 $ -;; Version: $Revision: 1.1 $ +;; Version: #Revision: 1.1 $ ;; RCS: ;; Description: Install a bare-bones EFS hook into file-name-handler-alist ;; for dumping @@ -11,8 +11,33 @@ ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(provide 'efs-dump) + +(defconst efs-dump-version + (concat (substring "$efs release: 1.15 $" 14 -2) + "/" + (substring "#Revision: 1.1 $" 11 -2))) + ;;;###autoload -(setq file-name-handler-alist - (cons - (cons efs-path-root-regexp 'efs-file-handler-function) - file-name-handler-alist)) +(defvar allow-remote-paths t + "*Set this to nil if you don't want remote paths to access +remote files.") + +;;;###autoload +(or (assoc efs-path-root-regexp file-name-handler-alist) + (setq file-name-handler-alist + (cons + (cons efs-path-root-regexp 'remote-path-file-handler-function) + file-name-handler-alist))) + +;;;###autoload +(defun remote-path-file-handler-function (operation &rest args) + "Function to call special file handlers for remote files." + (if allow-remote-paths + (apply 'efs-file-handler-function operation args) + (let ((inhibit-file-name-handlers + (cons 'remote-path-file-handler-function + (and (eq inhibit-file-name-operation operation) + inhibit-file-name-handlers))) + (inhibit-file-name-operation operation)) + (apply operation args))))