-(require 'tl-misc)
-
-(setq tm-modules
- '("signature"
- "tm-def"
- "tm-ew-d" "tm-parse" "tm-view" "tm-text" "tm-play" "tm-partial"
- "tm-latex" "tm-html" "tm-tar" "tm-file"
- "tm-ew-e"
- "tm-edit"
- "tm-rmail" "tm-mail"
- "tm-setup"
- ))
-
-(setq tm-uncompile-el-files '("sc-setup.el"))
-
-(if (file-installed-p "ange-ftp.el")
- (setq tm-modules (append tm-modules '("tm-ftp")))
- (setq tm-uncompile-el-files
- (append tm-uncompile-el-files '("tm-ftp.el")))
- )
-
-(if (file-installed-p "vm.elc")
- (setq tm-modules (append tm-modules '("tm-vm")))
- (setq tm-uncompile-el-files
- (append tm-uncompile-el-files '("tm-vm.el")))
- )
-
-(if (file-installed-p "mailcrypt.el")
- (setq tm-modules (append tm-modules '("tm-pgp")))
- (setq tm-uncompile-el-files
- (append tm-uncompile-el-files '("tm-pgp.el")))
- )
-
-(if (file-installed-p "bbdb.el")
- (setq tm-modules (append tm-modules '("tm-bbdb")))
- (setq tm-uncompile-el-files
- (append tm-uncompile-el-files '("tm-bbdb.el")))
- )
+(setq tm-modules-to-compile
+ '(signature
+ tm-def
+ tm-ew-d tm-parse tm-view tm-text tm-play tm-partial
+ tm-latex tm-html tm-tar tm-file
+ tm-ew-e tm-edit
+ tm-setup))
+
+(setq tm-modules-not-to-compile '(sc-setup))
+
+(mapcar (function
+ (lambda (cell)
+ (let ((c-module (car cell))
+ (i-modules (cdr cell))
+ )
+ (if (module-installed-p c-module)
+ (setq tm-modules-to-compile
+ (nconc tm-modules-to-compile i-modules))
+ (setq tm-modules-not-to-compile
+ (nconc tm-modules-not-to-compile i-modules))
+ )
+ )))
+ '((ange-ftp tm-ftp)
+ (mailcrypt tm-pgp tm-edit-mc)
+ (bbdb tm-bbdb)
+ ))