comparison 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
comparison
equal deleted inserted replaced
115:f109f7dabbe2 116:9f59509498e1
1 ;; -*-Emacs-Lisp-*- 1 ;; -*-Emacs-Lisp-*-
2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3 ;; 3 ;;
4 ;; File: efs-dump.el 4 ;; File: efs-dump.el
5 ;; Release: $efs release: 1.15 $ 5 ;; Release: $efs release: 1.15 $
6 ;; Version: $Revision: 1.1 $ 6 ;; Version: #Revision: 1.1 $
7 ;; RCS: 7 ;; RCS:
8 ;; Description: Install a bare-bones EFS hook into file-name-handler-alist 8 ;; Description: Install a bare-bones EFS hook into file-name-handler-alist
9 ;; for dumping 9 ;; for dumping
10 ;; Author: Mike Sperber <sperber@informatik.uni-tuebingen.de> 10 ;; Author: Mike Sperber <sperber@informatik.uni-tuebingen.de>
11 ;; 11 ;;
12 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 12 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
13 13
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
14 ;;;###autoload 21 ;;;###autoload
15 (setq file-name-handler-alist 22 (defvar allow-remote-paths t
16 (cons 23 "*Set this to nil if you don't want remote paths to access
17 (cons efs-path-root-regexp 'efs-file-handler-function) 24 remote files.")
18 file-name-handler-alist)) 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))))