5 (defun compile-tm-gnus ()
11 (princ (format "%s\n" gnus-version))
12 (cond ((boundp 'gnus-original-article-buffer)
13 (byte-compile-file "tm-sgnus.el")
15 ((string-match "Gnus v5\\|September Gnus" gnus-version)
16 (byte-compile-file "tm-gnus5.el")
18 ((string-match "(ding)" gnus-version)
20 (byte-compile-file "tm-dgnus.el")
21 (byte-compile-file "tm-gnus5.el")
23 ((string-match "GNUS 4" gnus-version)
24 (byte-compile-file "tm-gnus4.el")
26 ((string-match "GNUS 3" gnus-version)
27 (byte-compile-file "tm-gnus3.el")
29 (byte-compile-file "tm-gnus.el")
32 (defconst el-file-mode (+ (* 64 6)(* 8 4) 4))
34 (defun install-el (path file)
35 (let ((full-path (expand-file-name file path)))
36 (if (file-exists-p full-path)
37 (set-file-modes full-path el-file-mode)
39 (copy-file file full-path t t)
40 (princ (format "%s -> %s\n" file path))
43 (defun install-el-files (path &rest files)
44 (mapcar (function (lambda (file)
45 (if (file-exists-p file)
46 (install-el path file)
50 (defun install-elc (path file)
51 (let ((full-path (expand-file-name file path)))
52 (copy-file file full-path t t)
54 (princ (format "%s -> %s\n" file path))
57 (defun install-elc-files (path &rest files)
58 (mapcar (function (lambda (file)
59 (if (file-exists-p file)
60 (install-elc path file)
64 (defun install-tm-gnus ()
65 (let ((path (car command-line-args-left)))
66 (princ (format "%s\n" emacs-version))
67 (if (not (file-exists-p path))
68 (make-directory path t)
70 (if (< (string-to-int emacs-version) 19)
72 (install-el-files path
73 "tm-gnus.el" "tm-ognus.el"
74 "tm-gnus3.el" "tm-gnus4.el")
75 (install-elc-files path
77 "tm-gnus3.elc" "tm-gnus4.elc")
80 (install-el-files path
81 "tm-gnus.el" "tm-sgnus.el"
82 "tm-gnus5.el" "tm-dgnus.el"
83 "tm-ognus.el" "tm-gnus4.el")
84 (install-elc-files path
85 "tm-gnus.elc" "tm-sgnus.elc"
86 "tm-gnus5.elc" "tm-dgnus.elc"