annotate lisp/efs/efs-x19.15.el @ 22:8fc7fe29b841 r19-15b94

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