40
|
1 ;; -*-Emacs-Lisp-*-
|
|
2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
3 ;;
|
|
4 ;; File: efs-dump.el
|
|
5 ;; Release: $efs release: 1.15 $
|
42
|
6 ;; Version: #Revision: 1.1 $
|
40
|
7 ;; RCS:
|
|
8 ;; Description: Install a bare-bones EFS hook into file-name-handler-alist
|
|
9 ;; for dumping
|
|
10 ;; Author: Mike Sperber <sperber@informatik.uni-tuebingen.de>
|
|
11 ;;
|
|
12 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
13
|
42
|
14 (provide 'efs-dump)
|
|
15
|
|
16 (defconst efs-dump-version
|
|
17 (concat (substring "$efs release: 1.15 $" 14 -2)
|
|
18 "/"
|
|
19 (substring "#Revision: 1.1 $" 11 -2)))
|
|
20
|
40
|
21 ;;;###autoload
|
42
|
22 (defvar allow-remote-paths t
|
|
23 "*Set this to nil if you don't want remote paths to access
|
|
24 remote files.")
|
|
25
|
|
26 ;;;###autoload
|
|
27 (or (assoc efs-path-root-regexp file-name-handler-alist)
|
|
28 (setq file-name-handler-alist
|
|
29 (cons
|
|
30 (cons efs-path-root-regexp 'remote-path-file-handler-function)
|
|
31 file-name-handler-alist)))
|
|
32
|
|
33 ;;;###autoload
|
|
34 (defun remote-path-file-handler-function (operation &rest args)
|
|
35 "Function to call special file handlers for remote files."
|
|
36 (if allow-remote-paths
|
|
37 (apply 'efs-file-handler-function operation args)
|
|
38 (let ((inhibit-file-name-handlers
|
|
39 (cons 'remote-path-file-handler-function
|
|
40 (and (eq inhibit-file-name-operation operation)
|
|
41 inhibit-file-name-handlers)))
|
|
42 (inhibit-file-name-operation operation))
|
|
43 (apply operation args))))
|