Mercurial > hg > xemacs-beta
comparison lisp/efs/efs-x19.15.el @ 98:0d2f883870bc r20-1b1
Import from CVS: tag r20-1b1
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:13:56 +0200 |
parents | 8fc7fe29b841 |
children | 4103f0995bd7 4be1180a9e89 |
comparison
equal
deleted
inserted
replaced
97:498bf5da1c90 | 98:0d2f883870bc |
---|---|
1 ;; -*-Emacs-Lisp-*- | |
2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
3 ;; | |
4 ;; File: efs-x19.15.el | |
5 ;; Release: $efs release: 1.14 $ | |
6 ;; Version: $Revision: 1.1 $ | |
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 ;; Modified: by Mike Sperber | |
12 ;; | |
13 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
14 | |
15 (provide 'efs-x19\.15) | |
16 (require 'efs-cu) | |
17 (require 'default-dir) | |
18 (require 'efs-ovwrt) | |
19 | |
20 (defconst efs-x19\.15-version | |
21 (concat (substring "$efs release: 1.14 $" 14 -2) | |
22 "/" | |
23 (substring "$Revision: 1.1 $" 11 -2))) | |
24 | |
25 ;;; Functions requiring special defs. for these XEmacs versions. | |
26 | |
27 (defun efs-abbreviate-file-name (filename &optional hack-homedir) | |
28 ;; XEmacs version of abbreviate-file-name for remote files. | |
29 (let (file-name-handler-alist) | |
30 (if (and hack-homedir (efs-ftp-path filename)) | |
31 ;; Do replacements from directory-abbrev-alist | |
32 (apply 'efs-unexpand-parsed-filename | |
33 (efs-ftp-path (abbreviate-file-name filename nil))) | |
34 (abbreviate-file-name filename hack-homedir)))) | |
35 | |
36 (defun efs-set-buffer-file-name (filename) | |
37 ;; Sets the buffer local variables for filename appropriately. | |
38 ;; A special function because XEmacs and FSF do this differently. | |
39 (setq buffer-file-name filename) | |
40 (if (and efs-compute-remote-buffer-file-truename | |
41 (memq (efs-host-type (car (efs-ftp-path filename))) | |
42 efs-unix-host-types)) | |
43 (compute-buffer-file-truename) | |
44 (setq buffer-file-truename filename))) | |
45 | |
46 ;; Only XEmacs has this function. Why do we need both this and | |
47 ;; set-visited-file-modtime? | |
48 | |
49 (defun efs-set-buffer-modtime (buffer &optional time) | |
50 ;; For buffers visiting remote files, set the buffer modtime. | |
51 (or time | |
52 (progn | |
53 (setq time | |
54 (let* ((file (save-excursion | |
55 (set-buffer buffer) buffer-file-name)) | |
56 (parsed (efs-ftp-path file))) | |
57 (efs-get-file-mdtm (car parsed) (nth 1 parsed) | |
58 (nth 2 parsed) file))) | |
59 (if time | |
60 (setq time (cons (car time) (nth 1 time))) | |
61 (setq time '(0 . 0))))) | |
62 (let (file-name-handler-alist) | |
63 (set-buffer-modtime buffer time))) | |
64 | |
65 ;;; For the file-name-handler-alist | |
66 | |
67 (put 'set-buffer-modtime 'efs 'efs-set-buffer-modtime) | |
68 | |
69 ;;; end of efs-x19.15.el |