annotate lisp/efs/efs-x19.15.el @ 199:169c0442b401 r20-3b26

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