;;; -*-Emacs-Lisp-*- ;;; ;;; $Id: mk-tgnus,v 1.1 1995/11/18 08:07:24 morioka Exp morioka $ ;;; (require 'emu) (defun compile-tm-gnus () (require 'gnus) (require 'tm-gnus) (require 'tm-view) (require 'tm-partial) (require 'tm-edit) (princ (format "%s\n" gnus-version)) (cond ((boundp 'gnus-original-article-buffer) (byte-compile-file "tm-sgnus.el") ) ((string-match "Gnus v5\\|September Gnus" gnus-version) (byte-compile-file "tm-gnus4.el") (byte-compile-file "tm-gd5.el") ) ((string-match "GNUS 4" gnus-version) (byte-compile-file "tm-gnus4.el") ) ((string-match "GNUS 3" gnus-version) (byte-compile-file "tm-gnus3.el") )) (byte-compile-file "tm-gnus.el") ) (defconst el-file-mode (+ (* 64 6)(* 8 4) 4)) (defun install-el (path file) (let ((full-path (expand-file-name file path))) (if (file-exists-p full-path) (set-file-modes full-path el-file-mode) ) (copy-file file full-path t t) (princ (format "%s -> %s\n" file path)) )) (defun install-el-files (path &rest files) (mapcar (function (lambda (file) (if (file-exists-p file) (install-el path file) ))) files)) (defun install-elc (path file) (let ((full-path (expand-file-name file path))) (copy-file file full-path t t) (delete-file file) (princ (format "%s -> %s\n" file path)) )) (defun install-elc-files (path &rest files) (mapcar (function (lambda (file) (if (file-exists-p file) (install-elc path file) ))) files)) (defun install-tm-gnus () (let ((path (car command-line-args-left))) (princ (format "%s\n" emacs-version)) (if (not (file-exists-p path)) (make-directory path t) ) (if (< (string-to-int emacs-version) 19) (progn (install-el-files path "tm-gnus.el" "tm-gd3.el" "tm-gnus3.el" "tm-gnus4.el") (install-elc-files path "tm-gnus.elc" "tm-gnus3.elc" "tm-gnus4.elc") ) (progn (install-el-files path "tm-gnus.el" "tm-sgnus.el" "tm-gd5.el" "tm-gd3.el" "tm-gnus4.el") (install-elc-files path "tm-gnus.elc" "tm-sgnus.elc" "tm-gd5.elc" "tm-gnus4.elc") ))))