Mercurial > hg > xemacs-beta
comparison lisp/utils/shadowfile.el @ 209:41ff10fd062f r20-4b3
Import from CVS: tag r20-4b3
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:04:58 +0200 |
parents | 4be1180a9e89 |
children |
comparison
equal
deleted
inserted
replaced
208:f427b8ec4379 | 209:41ff10fd062f |
---|---|
23 ;; 02111-1307, USA. | 23 ;; 02111-1307, USA. |
24 | 24 |
25 ;; LCD Archive Entry: | 25 ;; LCD Archive Entry: |
26 ;; shadowfile|Boris Goldowsky|boris@gnu.ai.mit.edu| | 26 ;; shadowfile|Boris Goldowsky|boris@gnu.ai.mit.edu| |
27 ;; Helps you keep identical copies of files in multiple places.| | 27 ;; Helps you keep identical copies of files in multiple places.| |
28 ;; $Date: 1997/02/24 01:14:19 $ |$Revision: 1.2 $|~/misc/shadowfile.el.Z| | 28 ;; $Date: 1997/11/09 07:07:32 $ |$Revision: 1.3 $|~/misc/shadowfile.el.Z| |
29 | 29 |
30 ;;; Synched up with: FSF 19.30. | 30 ;;; Synched up with: FSF 19.30. |
31 | 31 |
32 ;; Commentary: | 32 ;; Commentary: |
33 | 33 |
84 ;;; Code: | 84 ;;; Code: |
85 | 85 |
86 (provide 'shadowfile) | 86 (provide 'shadowfile) |
87 (require 'efs-auto) | 87 (require 'efs-auto) |
88 | 88 |
89 ;;; I don't think this is very cool... hope it works without the setting. | |
89 (setq find-file-visit-truename t) ; makes life easier with symbolic links | 90 (setq find-file-visit-truename t) ; makes life easier with symbolic links |
90 | 91 |
91 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 92 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
92 ;;; Variables | 93 ;;; Variables |
93 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 94 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
94 | 95 (defgroup shadowfile nil |
95 (defvar shadow-noquery nil | 96 "Keep identical copies of files in more than one place." |
97 :group 'files | |
98 :prefix "shadow") | |
99 | |
100 (defcustom shadow-noquery nil | |
96 "*If t, always copy shadow files without asking. | 101 "*If t, always copy shadow files without asking. |
97 If nil \(the default), always ask. If not nil and not t, ask only if there | 102 If nil \(the default), always ask. If not nil and not t, ask only if there |
98 is no buffer currently visiting the file.") | 103 is no buffer currently visiting the file." |
99 | 104 :type 'boolean |
100 (defvar shadow-inhibit-message nil | 105 :group 'shadowfile) |
101 "*If nonnil, do not display a message when a file needs copying.") | 106 |
102 | 107 (defcustom shadow-inhibit-message nil |
103 (defvar shadow-inhibit-overload nil | 108 "*If nonnil, do not display a message when a file needs copying." |
109 :type 'boolean | |
110 :group 'shadowfile) | |
111 | |
112 (defcustom shadow-inhibit-overload nil | |
104 "If nonnil, shadowfile won't redefine C-x C-c. | 113 "If nonnil, shadowfile won't redefine C-x C-c. |
105 Normally it overloads the function `save-buffers-kill-emacs' to check | 114 Normally it overloads the function `save-buffers-kill-emacs' to check |
106 for files have been changed and need to be copied to other systems.") | 115 for files have been changed and need to be copied to other systems." |
107 | 116 :type 'boolean |
108 (defvar shadow-info-file nil | 117 :group 'shadowfile) |
118 | |
119 (defcustom shadow-info-file nil | |
109 "File to keep shadow information in. | 120 "File to keep shadow information in. |
110 The shadow-info-file should be shadowed to all your accounts to | 121 The shadow-info-file should be shadowed to all your accounts to |
111 ensure consistency. Default: ~/.shadows") | 122 ensure consistency. Default: ~/.xemacs/shadows" |
112 | 123 :type '(choice (const :tag "Default" nil) |
113 (defvar shadow-todo-file nil | 124 (file)) |
125 :group 'shadowfile) | |
126 | |
127 (defcustom shadow-todo-file nil | |
114 "File to store the list of uncopied shadows in. | 128 "File to store the list of uncopied shadows in. |
115 This means that if a remote system is down, or for any reason you cannot or | 129 This means that if a remote system is down, or for any reason you cannot or |
116 decide not to copy your shadow files at the end of one emacs session, it will | 130 decide not to copy your shadow files at the end of one emacs session, it will |
117 remember and ask you again in your next emacs session. | 131 remember and ask you again in your next emacs session. |
118 This file must NOT be shadowed to any other system, it is host-specific. | 132 This file must NOT be shadowed to any other system, it is host-specific. |
119 Default: ~/.shadow_todo") | 133 Default: ~/.xemacs/shadow_todo" |
134 :type '(choice (const :tag "Default" nil) | |
135 (file)) | |
136 :group 'shadowfile) | |
120 | 137 |
121 ;;; The following two variables should in most cases initialize themselves | 138 ;;; The following two variables should in most cases initialize themselves |
122 ;;; correctly. They are provided as variables in case the defaults are wrong | 139 ;;; correctly. They are provided as variables in case the defaults are wrong |
123 ;;; on your machine \(and for efficiency). | 140 ;;; on your machine \(and for efficiency). |
124 | 141 |
307 "Parse PATH into \(site user path) list, | 324 "Parse PATH into \(site user path) list, |
308 or leave it alone if it already is one. Returns nil if the argument is not a | 325 or leave it alone if it already is one. Returns nil if the argument is not a |
309 full efs ftp pathname." | 326 full efs ftp pathname." |
310 (if (listp fullpath) | 327 (if (listp fullpath) |
311 fullpath | 328 fullpath |
312 (efs-ftp-name fullpath))) | 329 (efs-ftp-path fullpath))) |
313 | 330 |
314 (defun shadow-parse-path (path) | 331 (defun shadow-parse-path (path) |
315 "Parse any PATH into \(site user path) list. | 332 "Parse any PATH into \(site user path) list. |
316 Argument can be a simple path, full efs ftp path, or already a hup list." | 333 Argument can be a simple path, full efs ftp path, or already a hup list." |
317 (or (shadow-parse-fullpath path) | 334 (or (shadow-parse-fullpath path) |