-;;; -*-Emacs-Lisp-*-
+;;; APEL-CFG --- user customizations for APEL installation. -*-Emacs-Lisp-*-
-;; APEL-CFG: installation setting about APEL.
+;;; Commentary:
+
+;; Use this file to override variables defined in APEL-MK.
;;; Code:
-(defvar default-load-path load-path)
-(setq load-path (cons (expand-file-name ".") load-path))
-(require 'install)
+;;; "custom" library.
+
+;; If you use "new custom" but do not use "subdirs.el" to add "custom"
+;; to your load-path, uncomment and edit this.
+;; (add-latest-path "custom")
+
-;;; @ Please specify prefix of install directory.
-;;;
+;;; Install to home directory.
-;; Please specify install path prefix.
-;; If it is omitted, shared directory (maybe /usr/local is used).
-(defvar PREFIX install-prefix)
-;;(setq PREFIX "~/")
+;; If you want to install APEL to home directory and you already have
+;; the standard hierarchy such as "~/share/emacs/site-lisp" and
+;; "~/share/emacs/VERSION/site-lisp", uncomment and edit this.
+;; (setq PREFIX "~/")
-;; Please specify emu prefix [optional]
-(setq EMU_PREFIX
- (if (or (featurep 'xemacs)
- (and (fboundp 'set-buffer-multibyte)
- (subrp (symbol-function 'set-buffer-multibyte))))
- "emu"
- ""))
+;; Or, you can specify APEL_DIR and EMU_DIR directly.
+;; (setq APEL_DIR "~/lib/emacs/lisp/apel")
+;; (setq EMU_DIR "~/lib/emacs/lisp/emu")
-;; Please specify prefix for ``apel'' [optional]
-(setq APEL_PREFIX "apel")
-\f
+;;; Install to site-lisp directories.
-;;; @ optional settings
-;;;
+;; (setq APEL_PREFIX "apel")
+;; (setq EMU_PREFIX "emu")
-(defvar VERSION_SPECIFIC_LISPDIR
- (install-detect-elisp-directory PREFIX nil 'version-specific))
+;; (setq PREFIX "/usr/local")
-(setq EMU_DIR (expand-file-name EMU_PREFIX VERSION_SPECIFIC_LISPDIR))
+;; Mule based on Emacs 19.28 and eariler.
+;; (setq LISPDIR "/usr/local/share/mule/site-lisp")
+;; Mule based on Emacs 19.29 and later.
+;; (setq LISPDIR "/usr/local/share/emacs/site-lisp")
+;; (setq LISPDIR "/usr/local/share/mule/site-lisp")
+;; (setq VERSION_SPECIFIC_LISPDIR "/usr/local/share/emacs/19.34/site-lisp")
+;; (setq VERSION_SPECIFIC_LISPDIR "/usr/local/share/mule/19.34/site-lisp")
-;; It is generated by automatically. Please set variable `PREFIX'.
-;; If you don't like default directory tree, please set it.
-(defvar LISPDIR (install-detect-elisp-directory PREFIX))
-;; (setq install-default-elisp-directory "~/lib/emacs/lisp")
+;; XXX: Needs PACKAGEDIR example. FIXME!
+;; (setq PACKAGEDIR "")
-(setq APEL_DIR (expand-file-name APEL_PREFIX LISPDIR))
+;; If you want to install all of APEL files to VERSION_SPECIFIC_LISPDIR,
+;; uncomment this.
;; (setq APEL_DIR (expand-file-name APEL_PREFIX VERSION_SPECIFIC_LISPDIR))
-(defvar PACKAGEDIR
- (if (boundp 'early-packages)
- (let ((dirs (append (if early-package-load-path
- early-packages)
- (if late-package-load-path
- late-packages)
- (if last-package-load-path
- last-packages)))
- dir)
- (while (not (file-exists-p
- (setq dir (car dirs))))
- (setq dirs (cdr dirs)))
- dir)))
+;; You can specify APEL_DIR and EMU_DIR directly.
+;; (setq APEL_DIR (expand-file-name APEL_PREFIX LISPDIR))
+;; (setq EMU_DIR (expand-file-name EMU_PREFIX VERSION_SPECIFIC_LISPDIR))
;;; APEL-CFG ends here
-;;; -*-Emacs-Lisp-*-
+;;; APEL-ELS --- list of APEL modules to install -*-Emacs-Lisp-*-
-;; APEL-ELS: list of APEL modules to install
+;;; Commentary:
-;;; Code:
-
-(setq apel-modules '(alist calist
- path-util filename install
- mule-caesar
+;; APEL-MK imports `apel-modules' from here.
- ;; [obsoleted modules] If you would like to
- ;; install following, please activate them.
+;;; Code:
- ;; atype file-detect
- ))
+(defvar apel-modules '(alist calist path-util filename install
+ ;; "mule-caesar" is version-dependent.
+ ;; moved to EMU-ELS.
+ ;; mule-caesar
-(if (or (< emacs-major-version 19)
- (and (eq emacs-major-version 19) (< emacs-minor-version 16)))
- (setq apel-modules (cons 'time-stamp apel-modules))
- )
+ ;; [obsoleted modules] If you would like to
+ ;; install following, please activate them.
+ ;; atype file-detect
+ ))
;;; APEL-ELS ends here
-;;; -*-Emacs-Lisp-*-
+;;; APEL-MK --- installer for APEL. -*-Emacs-Lisp-*-
-;; APEL-MK: installer for APEL.
+;;; Commentary:
+
+;; DON'T EDIT THIS FILE; edit APEL-CFG instead.
;;; Code:
+;;; Standard configuration variables.
+
+;; These two variables will be generated from other variables below.
+(defvar APEL_DIR nil)
+(defvar EMU_DIR nil)
+
+;; Install to "apel" subdirectory.
+(defvar APEL_PREFIX "apel")
+(defvar EMU_PREFIX
+ (if (or (featurep 'xemacs)
+ (fboundp 'normal-top-level-add-subdirs-to-load-path))
+ ;; Install to "emu" subdirectory.
+ "emu"
+ ;; If your emacs does not have `normal-top-level-add-subdirs-to-load-path'
+ ;; but have `normal-top-level-add-to-load-path' and you want to use it in
+ ;; "subdirs.el", put the following line to "APEL-CFG".
+ ;; (setq EMU_PREFIX "emu")
+ ""))
+
+;; Detect site-lisp directories.
+(defvar default-load-path load-path)
+(setq load-path (cons (expand-file-name ".") load-path))
+(require 'poe)
+(require 'install)
+
+;; override everything you want.
+(load-file "APEL-CFG")
+
+;; The following four variables will be overrided by command line options.
+(defvar PREFIX install-prefix)
+;; v18: (no standard site-lisp directory)
+;; Emacs 19.28 and earlier: "PREFIX/lib/emacs/site-lisp"
+;; Emacs 19.29 and later: "PREFIX/share/emacs/site-lisp"
+(defvar LISPDIR
+ (install-detect-elisp-directory PREFIX))
+;; Emacs 19.31 and later: "PREFIX/share/emacs/VERSION/site-lisp".
+(defvar VERSION_SPECIFIC_LISPDIR
+ (install-detect-elisp-directory PREFIX nil 'version-specific))
+;; for XEmacs package system.
+(defvar PACKAGEDIR
+ (if (boundp 'early-packages)
+ (let ((dirs (append (if early-package-load-path
+ early-packages)
+ (if late-package-load-path
+ late-packages)
+ (if last-package-load-path
+ last-packages)))
+ dir)
+ (while (not (file-exists-p (setq dir (car dirs))))
+ (setq dirs (cdr dirs)))
+ dir)))
+
+
+;;; Utilities. (XXX: should be moved to install.el ?)
+
(defun install-just-print-p ()
(let ((flag (getenv "MAKEFLAGS"))
case-fold-search)
(princ (format "%s\n" flag))
(if flag
- (string-match "^\\(\\(--[^ ]+ \\)+-\\|[^ =-]\\)*n" flag)
- )))
+ (string-match "^\\(\\(--[^ ]+ \\)+-\\|[^ =-]\\)*n" flag))))
(defun install-update-package-files (package dir &optional just-print)
- (cond (just-print
- (princ (format "Updating autoloads in directory %s..\n\n" dir))
-
- (princ (format "Processing %s\n" dir))
- (princ "Generating custom-load.el...\n\n")
-
- (princ (format "Compiling %s...\n"
- (expand-file-name "auto-autoloads.el" dir)))
- (princ (format "Wrote %s\n"
- (expand-file-name "auto-autoloads.elc" dir)))
-
- (princ (format "Compiling %s...\n"
- (expand-file-name "custom-load.el" dir)))
- (princ (format "Wrote %s\n"
- (expand-file-name "custom-load.elc" dir)))
- )
- (t
- (setq autoload-package-name package)
- (add-to-list 'command-line-args-left dir)
- (batch-update-directory)
-
- (add-to-list 'command-line-args-left dir)
- (Custom-make-dependencies)
-
- (byte-compile-file (expand-file-name "auto-autoloads.el" dir))
- (byte-compile-file (expand-file-name "custom-load.el" dir))
- )))
+ (cond
+ (just-print
+ (princ (format "Updating autoloads in directory %s..\n\n" dir))
+
+ (princ (format "Processing %s\n" dir))
+ (princ "Generating custom-load.el...\n\n")
+
+ (princ (format "Compiling %s...\n"
+ (expand-file-name "auto-autoloads.el" dir)))
+ (princ (format "Wrote %s\n"
+ (expand-file-name "auto-autoloads.elc" dir)))
+
+ (princ (format "Compiling %s...\n"
+ (expand-file-name "custom-load.el" dir)))
+ (princ (format "Wrote %s\n"
+ (expand-file-name "custom-load.elc" dir))))
+ (t
+ (setq autoload-package-name package)
+ (add-to-list 'command-line-args-left dir)
+ (batch-update-directory)
+
+ (add-to-list 'command-line-args-left dir)
+ (Custom-make-dependencies)
+
+ (byte-compile-file (expand-file-name "auto-autoloads.el" dir))
+ (byte-compile-file (expand-file-name "custom-load.el" dir)))))
+
+
+;;; Tools for Configure, Compile, and Install.
(defun config-apel ()
(let (prefix lisp-dir version-specific-lisp-dir)
- (and (setq prefix (car command-line-args-left))
+ ;; override standard PREFIX, LISPDIR, and VERSION_SPECIFIC_LISPDIR
+ ;; with command-line options.
+ (and (setq prefix (prog1
+ ;; avoid using `pop'.
+ (car command-line-args-left)
+ (setq command-line-args-left
+ (cdr command-line-args-left))))
(or (string-equal "NONE" prefix)
- (defvar PREFIX prefix)
- ))
- (setq command-line-args-left (cdr command-line-args-left))
- (and (setq lisp-dir (car command-line-args-left))
+ (setq PREFIX prefix)))
+ (and (setq lisp-dir (prog1
+ (car command-line-args-left)
+ (setq command-line-args-left
+ (cdr command-line-args-left))))
(or (string-equal "NONE" lisp-dir)
- (defvar LISPDIR lisp-dir)
- ))
- (setq command-line-args-left (cdr command-line-args-left))
- (and (setq version-specific-lisp-dir (car command-line-args-left))
+ (setq LISPDIR lisp-dir)))
+ (and (setq version-specific-lisp-dir
+ (prog1
+ (car command-line-args-left)
+ (setq command-line-args-left
+ (cdr command-line-args-left))))
(or (string-equal "NONE" version-specific-lisp-dir)
- (progn
- (defvar VERSION_SPECIFIC_LISPDIR version-specific-lisp-dir)
- (princ (format "VERSION_SPECIFIC_LISPDIR=%s\n"
- VERSION_SPECIFIC_LISPDIR)))
- ))
- (setq command-line-args-left (cdr command-line-args-left))
- (load-file "APEL-CFG")
- (or (boundp 'apel-modules)
- (load-file "APEL-ELS")
- )
- (princ (format "PREFIX=%s\n" PREFIX))
- ))
+ (setq VERSION_SPECIFIC_LISPDIR version-specific-lisp-dir)))
+ ;; directories we actually use.
+ (or APEL_DIR
+ (setq APEL_DIR (expand-file-name APEL_PREFIX LISPDIR)))
+ (or EMU_DIR
+ (setq EMU_DIR (expand-file-name EMU_PREFIX VERSION_SPECIFIC_LISPDIR)))
+ ;; import `apel-modules'.
+ (load-file "APEL-ELS")
+ ;; import `emu-modules' and `emu-modules-to-compile'.
+ (load-file "EMU-ELS")
+ (princ (format "\nLISPDIR=%s\n" LISPDIR))
+ (princ (format "VERSION_SPECIFIC_LISPDIR=%s\n" VERSION_SPECIFIC_LISPDIR))))
(defun compile-apel ()
(config-apel)
- (load-file "EMU-ELS")
- (load-file "APEL-ELS")
+ ;; compile emu modules first.
(compile-elisp-modules emu-modules-to-compile ".")
- (compile-elisp-modules apel-modules ".")
- )
+ (compile-elisp-modules apel-modules "."))
(defun install-apel ()
(compile-apel)
(let ((just-print (install-just-print-p)))
(install-elisp-modules emu-modules "." EMU_DIR just-print)
- (install-elisp-modules apel-modules "." APEL_DIR just-print)
- ))
+ (install-elisp-modules apel-modules "." APEL_DIR just-print)))
+;; for XEmacs package system.
(defun config-apel-package ()
(let (package-dir)
- (and (setq package-dir (car command-line-args-left))
+ ;; override standard PACKAGEDIR with command-line option.
+ (and (setq package-dir (prog1
+ ;; avoid using `pop'.
+ (car command-line-args-left)
+ (setq command-line-args-left
+ (cdr command-line-args-left))))
(or (string= "NONE" package-dir)
- (defvar PACKAGEDIR package-dir)
- ))
- (setq command-line-args-left (cdr command-line-args-left))
- (load-file "APEL-CFG")
+ (defvar PACKAGEDIR package-dir)))
+ ;; import `apel-modules'.
(load-file "APEL-ELS")
+ ;; import `emu-modules' and `emu-modules-to-compile'.
(load-file "EMU-ELS")
-
- (princ (format "PACKAGEDIR=%s\n" PACKAGEDIR))
- ))
+ (princ (format "\nPACKAGEDIR=%s\n" PACKAGEDIR))))
(defun compile-apel-package ()
(config-apel-package)
+ ;; compile emu modules first.
(compile-elisp-modules emu-modules-to-compile ".")
- (compile-elisp-modules apel-modules ".")
- )
+ (compile-elisp-modules apel-modules "."))
(defun install-apel-package ()
(config-apel-package)
(expand-file-name "lisp" PACKAGEDIR))))
(install-elisp-modules emu-modules "." dir just-print)
(install-elisp-modules apel-modules "." dir just-print)
- (install-update-package-files "apel" dir just-print)
- ))
+ (install-update-package-files "apel" dir just-print)))
(defun what-where-apel ()
(config-apel)
- (load-file "EMU-ELS")
(princ (format "
The files that belong to the EMU modules:
%s
%s
-> %s
"
- (mapconcat 'symbol-name emu-modules ", ")
+ (mapconcat (function symbol-name) emu-modules ", ")
EMU_DIR
- (mapconcat 'symbol-name apel-modules ", ")
+ (mapconcat (function symbol-name) apel-modules ", ")
APEL_DIR)))
;;; APEL-MK ends here
-;;; -*-Emacs-Lisp-*-
+;;; EMU-ELS --- list of EMU modules to install -*-Emacs-Lisp-*-
-;; EMU-ELS: list of EMU modules to install
+;;; Commentary:
+
+;; APEL-MK imports `emu-modules' and `emu-modules-to-compile' from here.
;;; Code:
-(setq emu-modules (cons 'emu
- (if (if (featurep 'xemacs)
- ;; running-xemacs-19_14-or-later
- (or (>= emacs-major-version 20)
- (and (= emacs-major-version 19)
- (>= emacs-minor-version 14)))
- ;; running-emacs-19_29-or-later
- (or (>= emacs-major-version 20)
- (and (= emacs-major-version 19)
- (>= emacs-minor-version 29))))
- '(richtext)
- '(tinyrich))))
-
-(setq emu-modules-to-compile nil)
-
-(setq emu-modules-not-to-compile nil)
-
-(setq pcustom-modules (if (and (module-installed-p 'custom)
- ;; new custom requires widget.
- (module-installed-p 'widget))
- '(pcustom)
- ;; XXX: order is significant in current make process.
- '(tinycustom pcustom)))
-
-(let ((poe-modules '(poe))
- (pces-modules '(pces))
- (poem-modules '(poem))
- (mcs-modules '(mcharset))
- (invisible-modules '(invisible))
- (pccl-modules '(pccl)))
- (cond ((featurep 'xemacs)
- (setq poe-modules (cons 'poe-xemacs poe-modules)
- invisible-modules (cons 'inv-xemacs invisible-modules))
- )
- ((>= emacs-major-version 19)
- (setq invisible-modules (cons 'inv-19 invisible-modules))
- (if (and (= emacs-major-version 19)
- (<= emacs-minor-version 28))
- (setq poe-modules (cons 'localhook poe-modules))
- )
- )
- (t
- (setq poe-modules (cons 'env (cons 'poe-18 (cons 'localhook poe-modules)))
- invisible-modules (cons 'inv-18 invisible-modules))
- ))
- (cond ((featurep 'xemacs)
- (if (featurep 'file-coding)
- (setq pces-modules (cons 'pces-xfc (cons 'pces-20 pces-modules)))
- )
- (if (featurep 'mule)
- (setq pces-modules (cons 'pces-xm pces-modules))
- (setq pces-modules (cons 'pces-raw pces-modules))
- ))
- ((featurep 'mule)
- (cond ((>= emacs-major-version 20)
- (setq pces-modules
- (cons 'pces-e20 (cons 'pces-20 pces-modules)))
- (or (and (fboundp 'set-buffer-multibyte)
- (subrp (symbol-function 'set-buffer-multibyte)))
- (setq pces-modules (cons 'pces-e20_2 pces-modules)))
- )
- (t
- ;; for MULE 1.* and 2.*
- (setq pces-modules (cons 'pces-om pces-modules))
- )))
- ((boundp 'NEMACS)
- ;; for Nemacs and Nepoch
- (setq pces-modules (cons 'pces-nemacs pces-modules))
- )
- (t
- (setq pces-modules (cons 'pces-raw pces-modules))
- ))
- (cond ((featurep 'mule)
- (cond ((featurep 'xemacs)
- (setq poem-modules (cons 'poem-xm poem-modules)
- mcs-modules (append '(mcs-xmu mcs-xm mcs-20)
- mcs-modules))
- (if (featurep 'utf-2000)
- (setq emu-modules-not-to-compile
- (cons 'mcs-xmu emu-modules-not-to-compile)))
- (if (>= emacs-major-version 21)
- (setq pccl-modules (cons 'pccl-20 pccl-modules))
- ))
- ((>= emacs-major-version 20)
- (setq poem-modules (cons 'poem-e20 poem-modules)
- mcs-modules (cons 'mcs-e20 (cons 'mcs-20 mcs-modules))
- pccl-modules (cons 'pccl-20 pccl-modules))
- (setq poem-modules
- (cons
- (if (and
- (fboundp 'set-buffer-multibyte)
- (subrp (symbol-function 'set-buffer-multibyte)))
- 'poem-e20_3
- 'poem-e20_2)
- poem-modules))
- )
- (t
- (setq poem-modules (cons 'poem-om poem-modules)
- mcs-modules (cons 'mcs-om mcs-modules)
- pccl-modules (cons 'pccl-om pccl-modules)
- emu-modules (cons 'emu-mule emu-modules))
- ))
- )
- ((boundp 'NEMACS)
- (setq poem-modules (cons 'poem-nemacs poem-modules)
- mcs-modules (cons 'mcs-nemacs mcs-modules))
- )
- (t
- (setq poem-modules (cons 'poem-ltn1 poem-modules)
- mcs-modules (cons 'mcs-ltn1 mcs-modules))
- ))
-
- (setq emu-modules (append poe-modules
- pces-modules poem-modules
- mcs-modules invisible-modules
- pccl-modules pcustom-modules
- emu-modules))
-
- (setq emu-modules (cons 'broken emu-modules))
- (setq emu-modules (cons 'static emu-modules))
- )
-
-(let ((modules emu-modules)
- module)
+(defvar emu-modules-not-to-compile nil)
+(defvar emu-modules-to-compile nil)
+
+;; We use compile-time evaluation heavily. So, order of compilation is
+;; very significant. For example, loading some module before compiling
+;; it will cause "compile-time" evaluation many times.
+(defvar emu-modules
+ (nconc
+ ;; modules are sorted by compilation order.
+ '(static broken)
+ ;; coming soon.
+ ;; '(product)
+
+ ;; poe modules; poe modules depend on static.
+ (cond
+ ;; XEmacs.
+ ((featurep 'xemacs)
+ '(poe-xemacs poe))
+ ;; Emacs 19.29 and earlier. (yes, includes Emacs 19.29.)
+ ((and (= emacs-major-version 19)
+ (<= emacs-minor-version 29))
+ '(localhook poe))
+ ;; Emacs 19.30 and later.
+ ((>= emacs-major-version 19)
+ '(poe))
+ (t
+ ;; v18.
+ '(localhook env poe-18 poe)))
+
+ ;; pcustom modules; pcustom modules depend on poe.
+ (if (and (module-installed-p 'custom)
+ ;; new custom requires widget.
+ (module-installed-p 'widget))
+ ;; if both 'custom and 'widget are found, we have new custom.
+ '(pcustom)
+ ;; pcustom does (require 'custom) at compile-time, and tinycustom
+ ;; need to test existence of some custom macros at compile-time!
+ ;; so, we must compile tinycustom first.
+ '(tinycustom pcustom))
+
+ ;; pccl modules; pccl modules depend on broken.
+ (cond
+ ((featurep 'mule)
+ (cond
+ ;; XEmacs 21 w/ mule.
+ ((and (featurep 'xemacs)
+ (>= emacs-major-version 21))
+ '(pccl-20 pccl))
+ ;; Emacs 20.
+ ((>= emacs-major-version 20)
+ '(pccl-20 pccl))
+ (t
+ ;; Mule 1.* and 2.*.
+ '(pccl-om pccl)))))
+
+ ;; pces modules; pces modules depend on poe.
+ (cond
+ ((featurep 'xemacs)
+ (cond
+ ((featurep 'mule)
+ ;; XEmacs w/ mule.
+ ;; pces-xfc depends pces-20, so we compile pces-20 first.
+ '(pces-20 pces-xm pces-xfc pces))
+ ((featurep 'file-coding)
+ ;; XEmacs w/ file-coding.
+ ;; pces-xfc depends pces-20, so we compile pces-20 first.
+ '(pces-20 pces-xfc pces))
+ (t
+ '(pces-raw pces))))
+ ((featurep 'mule)
+ (cond
+ ;; Emacs 20.3 and later.
+ ((and (fboundp 'set-buffer-multibyte)
+ (subrp (symbol-function 'set-buffer-multibyte)))
+ ;; pces-e20 depends pces-20, so we compile pces-20 first.
+ '(pces-20 pces-e20 pces))
+ ;; Emacs 20.1 and 20.2.
+ ((= emacs-major-version 20)
+ ;; pces-e20 depends pces-20, so we compile pces-20 first.
+ '(pces-20 pces-e20_2 pces-e20 pces))
+ (t
+ ;; Mule 1.* and 2.*.
+ '(pces-om pces))))
+ ((boundp 'NEMACS)
+ ;; Nemacs.
+ '(pces-nemacs pces))
+ (t
+ '(pces-raw pces)))
+
+ ;; poem modules; poem modules depend on pces.
+ (cond
+ ((featurep 'mule)
+ (cond
+ ((featurep 'xemacs)
+ ;; XEmacs w/ mule.
+ '(poem-xm poem))
+ ((>= emacs-major-version 20)
+ (if (and (fboundp 'set-buffer-multibyte)
+ (subrp (symbol-function 'set-buffer-multibyte)))
+ ;; Emacs 20.3 and later.
+ '(poem-e20_3 poem-e20 poem)
+ ;; Emacs 20.1 and 20.2.
+ '(poem-e20_2 poem-e20 poem)))
+ (t
+ ;; Mule 1.* and 2.*.
+ '(poem-om poem))))
+ ((boundp 'NEMACS)
+ '(poem-nemacs poem))
+ (t
+ '(poem-ltn1 poem)))
+
+ ;; mcharset modules; mcharset modules depend on poem and pcustom.
+ (cond
+ ((featurep 'mule)
+ (cond
+ ((featurep 'xemacs)
+ ;; XEmacs w/ mule.
+ (if (featurep 'utf-2000)
+ ;; XEmacs w/ UTF-2000.
+ (setq emu-modules-not-to-compile
+ (cons 'mcs-xmu emu-modules-not-to-compile)))
+ ;; mcs-xm depends mcs-20, so we compile mcs-20 first.
+ '(mcs-20 mcs-xmu mcs-xm mcharset))
+ ((>= emacs-major-version 20)
+ ;; Emacs 20 and later.
+ ;; mcs-e20 depends mcs-20, so we compile mcs-20 first.
+ '(mcs-20 mcs-e20 mcharset))
+ (t
+ ;; Mule 1.* and 2.*.
+ '(mcs-om mcharset))))
+ ((boundp 'NEMACS)
+ ;; Nemacs.
+ '(mcs-nemacs mcharset))
+ (t
+ '(mcs-ltn1 mcharset)))
+
+ ;; mule-caesar.el; part of apel-modules, but it is version-dependent.
+ '(mule-caesar)
+
+ ;; time-stamp.el; First appeared in Emacs 19.16.
+ ;; XXX: is this intended to include XEmacs ? FIXME!
+ (if (or (< emacs-major-version 19)
+ (and (= emacs-major-version 19)
+ (< emacs-minor-version 16)))
+ '(time-stamp))
+
+ ;; timezone.el; Some versions have Y2K problem.
+ ;; coming soon.
+
+ ;; invisible modules; provided for backward compatibility with old "tm".
+ (cond
+ ((featurep 'xemacs)
+ ;; XEmacs.
+ '(inv-xemacs invisible))
+ ((>= emacs-major-version 19)
+ ;; Emacs 19 and later.
+ '(inv-19 invisible))
+ (t
+ ;; v18.
+ '(inv-18 invisible)))
+
+ ;; emu modules; provided for backward compatibility with old "tm".
+ (if (and (featurep 'mule)
+ (< emacs-major-version 20))
+ ;; Mule 1.* and 2.*.
+ '(emu-mule emu)
+ '(emu))
+
+ ;; emu submodules; text/richtext and text/enriched support.
+ (if (if (featurep 'xemacs)
+ (or (>= emacs-major-version 20)
+ (and (= emacs-major-version 19)
+ (>= emacs-minor-version 14)))
+ (or (>= emacs-major-version 20)
+ (and (= emacs-major-version 19)
+ (>= emacs-minor-version 29))))
+ ;; XEmacs 19.14 and later, or Emacs 19.29 and later.
+ '(richtext)
+ '(tinyrich))))
+
+;; Generate `emu-modules-to-compile' from `emu-modules-not-to-compile'
+;; and `emu-modules'.
+(let ((modules emu-modules-not-to-compile))
+ (setq emu-modules-to-compile (copy-sequence emu-modules))
(while modules
- (setq module (car modules)
- modules (cdr modules))
- (if (memq module emu-modules-not-to-compile)
- nil
- (setq emu-modules-to-compile (nconc emu-modules-to-compile
- (list module))))))
+ (setq emu-modules-to-compile (delq (car modules) emu-modules-to-compile)
+ modules (cdr modules))))
;;; EMU-ELS ends here