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 (byte-compile-file "tm-gnus.el")
26 (defconst el-file-mode (+ (* 64 6)(* 8 4) 4))
28 (defun install-el (path file)
29 (let ((full-path (expand-file-name file path)))
30 (if (file-exists-p full-path)
31 (set-file-modes full-path el-file-mode)
33 (copy-file file full-path t t)
34 (princ (format "%s -> %s\n" file path))
37 (defun install-el-files (path &rest files)
38 (mapcar (function (lambda (file)
39 (if (file-exists-p file)
40 (install-el path file)
44 (defun install-elc (path file)
45 (let ((full-path (expand-file-name file path)))
46 (copy-file file full-path t t)
48 (princ (format "%s -> %s\n" file path))
51 (defun install-elc-files (path &rest files)
52 (mapcar (function (lambda (file)
53 (if (file-exists-p file)
54 (install-elc path file)
58 (defun install-tm-gnus ()
59 (let ((path (car command-line-args-left)))
60 (princ (format "%s\n" emacs-version))
61 (if (not (file-exists-p path))
62 (make-directory path t)
64 (if (< (string-to-int emacs-version) 19)
66 (install-el-files path
67 "tm-gnus.el" "tm-ognus.el"
68 "tm-gnus3.el" "tm-gnus4.el")
69 (install-elc-files path
71 "tm-gnus3.elc" "tm-gnus4.elc")
74 (install-el-files path
75 "tm-gnus.el" "tm-gnus5.el"
77 "tm-ognus.el" "tm-gnus4.el")
78 (install-elc-files path
79 "tm-gnus.elc" "tm-gnus5.elc"