5 (defun compile-tm-gnus ()
8 (princ (format "%s\n" gnus-version))
9 (cond ((string-match "GNUS 3" gnus-version)
10 (byte-compile-file "tm-gnus3.el")
12 ((string-match "GNUS 4" gnus-version)
13 (byte-compile-file "tm-gnus4.el")
15 ((string-match "(ding)" gnus-version)
17 (byte-compile-file "tm-dgnus.el")
18 (byte-compile-file "tm-gnus5.el")
20 ((string-match "Gnus v5" gnus-version)
21 (byte-compile-file "tm-gnus5.el")
23 ((string-match "September Gnus" gnus-version)
24 (byte-compile-file "tm-sgnus.el")
26 (byte-compile-file "tm-gnus.el")
29 (defconst el-file-mode (+ (* 64 6)(* 8 4) 4))
31 (defun install-el (path file)
32 (let ((full-path (expand-file-name file path)))
33 (if (file-exists-p full-path)
34 (set-file-modes full-path el-file-mode)
36 (copy-file file full-path t t)
37 (princ (format "%s -> %s\n" file path))
40 (defun install-el-files (path &rest files)
41 (mapcar (function (lambda (file)
42 (if (file-exists-p file)
43 (install-el path file)
47 (defun install-elc (path file)
48 (let ((full-path (expand-file-name file path)))
49 (copy-file file full-path t t)
51 (princ (format "%s -> %s\n" file path))
54 (defun install-elc-files (path &rest files)
55 (mapcar (function (lambda (file)
56 (if (file-exists-p file)
57 (install-elc path file)
61 (defun install-tm-gnus ()
62 (let ((path (car command-line-args-left)))
63 (princ (format "%s\n" emacs-version))
64 (if (not (file-exists-p path))
65 (make-directory path t)
67 (if (< (string-to-int emacs-version) 19)
69 (install-el-files path
70 "tm-gnus.el" "tm-ognus.el"
71 "tm-gnus3.el" "tm-gnus4.el")
72 (install-elc-files path
74 "tm-gnus3.elc" "tm-gnus4.elc")
77 (install-el-files path
78 "tm-gnus.el" "tm-sgnus.el"
79 "tm-gnus5.el" "tm-dgnus.el"
80 "tm-ognus.el" "tm-gnus4.el")
81 (install-elc-files path
82 "tm-gnus.elc" "tm-sgnus.elc"
83 "tm-gnus5.elc" "tm-dgnus.elc"