22
|
1 ;; -*-Emacs-Lisp-*-
|
|
2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
3 ;;
|
|
4 ;; File: efs-x19.15.el
|
100
|
5 ;; Release: $efs release: 1.15 $
|
116
|
6 ;; Version: #Revision: 1.2 $
|
22
|
7 ;; RCS:
|
|
8 ;; Description: efs support for XEmacs, versions 19.15, and later.
|
|
9 ;; Author: Sandy Rutherford <sandy@ibm550.sissa.it>
|
|
10 ;; Created: Tue Aug 2 17:40:32 1994 by sandy on ibm550
|
|
11 ;;
|
|
12 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
13
|
|
14 (provide 'efs-x19\.15)
|
|
15 (require 'efs-cu)
|
|
16 (require 'efs-ovwrt)
|
|
17
|
|
18 (defconst efs-x19\.15-version
|
100
|
19 (concat (substring "$efs release: 1.15 $" 14 -2)
|
22
|
20 "/"
|
116
|
21 (substring "#Revision: 1.2 $" 11 -2)))
|
22
|
22
|
|
23 ;;; Functions requiring special defs. for these XEmacs versions.
|
|
24
|
|
25 (defun efs-abbreviate-file-name (filename &optional hack-homedir)
|
|
26 ;; XEmacs version of abbreviate-file-name for remote files.
|
|
27 (let (file-name-handler-alist)
|
|
28 (if (and hack-homedir (efs-ftp-path filename))
|
|
29 ;; Do replacements from directory-abbrev-alist
|
|
30 (apply 'efs-unexpand-parsed-filename
|
|
31 (efs-ftp-path (abbreviate-file-name filename nil)))
|
|
32 (abbreviate-file-name filename hack-homedir))))
|
|
33
|
|
34 (defun efs-set-buffer-file-name (filename)
|
|
35 ;; Sets the buffer local variables for filename appropriately.
|
|
36 ;; A special function because XEmacs and FSF do this differently.
|
|
37 (setq buffer-file-name filename)
|
|
38 (if (and efs-compute-remote-buffer-file-truename
|
|
39 (memq (efs-host-type (car (efs-ftp-path filename)))
|
|
40 efs-unix-host-types))
|
|
41 (compute-buffer-file-truename)
|
|
42 (setq buffer-file-truename filename)))
|
|
43
|
|
44 ;; Only XEmacs has this function. Why do we need both this and
|
|
45 ;; set-visited-file-modtime?
|
|
46
|
|
47 (defun efs-set-buffer-modtime (buffer &optional time)
|
|
48 ;; For buffers visiting remote files, set the buffer modtime.
|
|
49 (or time
|
|
50 (progn
|
|
51 (setq time
|
|
52 (let* ((file (save-excursion
|
|
53 (set-buffer buffer) buffer-file-name))
|
|
54 (parsed (efs-ftp-path file)))
|
|
55 (efs-get-file-mdtm (car parsed) (nth 1 parsed)
|
|
56 (nth 2 parsed) file)))
|
|
57 (if time
|
|
58 (setq time (cons (car time) (nth 1 time)))
|
|
59 (setq time '(0 . 0)))))
|
|
60 (let (file-name-handler-alist)
|
|
61 (set-buffer-modtime buffer time)))
|
|
62
|
|
63 ;;; For the file-name-handler-alist
|
|
64
|
|
65 (put 'set-buffer-modtime 'efs 'efs-set-buffer-modtime)
|
|
66
|
|
67 ;;; end of efs-x19.15.el
|