Fix my email address.
[elisp/flim.git] / FLIM-CFG
1 ;;; -*-Emacs-Lisp-*-
2
3 ;; FLIM-CFG: installation setting about FLIM.
4
5 ;;; Code:
6
7 (defvar default-load-path load-path)
8
9 (if (fboundp 'add-to-list)
10     nil
11   ;; Emacs 19.29 emulating function.
12   (defun add-to-list (list-var element)
13     (set list-var (cons element (symbol-value list-var)))))
14
15 (if (boundp 'data-directory)
16     nil
17   ;; Emacs 19 emulating variable.
18   (defvar data-directory exec-directory))
19
20 (add-to-list 'load-path
21              (expand-file-name "../../site-lisp/apel" data-directory))
22
23 (if (boundp 'LISPDIR)
24     (progn
25       (add-to-list 'default-load-path LISPDIR)
26       (add-to-list 'load-path LISPDIR)
27       (add-to-list 'load-path (expand-file-name "apel" LISPDIR))))
28
29 (if (boundp 'VERSION_SPECIFIC_LISPDIR)
30     (add-to-list 'load-path VERSION_SPECIFIC_LISPDIR))
31
32 (if (fboundp 'member)
33     nil
34   ;; It is needed because the function `add-path' uses it.
35   (require 'poe))
36
37 (require 'install)
38
39 (add-latest-path "custom")
40
41 (add-path default-directory)
42
43 ;; (or (fboundp 'write-region-as-binary)
44 ;;     (error "Please install latest APEL 7.3 or later."))
45 ;; (or (fboundp 'insert-file-contents-as-binary)
46 ;;     (error "Please install latest APEL 7.3 or later."))
47
48
49 ;;; @ Please specify prefix of install directory.
50 ;;;
51
52 ;; Please specify install path prefix.
53 ;; If it is omitted, shared directory (maybe /usr/local is used).
54 (defvar PREFIX install-prefix)
55 ;;(setq PREFIX "~/")
56
57 ;; Please specify prefix for ``FLIM'' [optional]
58 (setq FLIM_PREFIX "flim")
59
60 \f
61
62 ;;; @ optional settings
63 ;;;
64
65 ;; It is generated by automatically. Please set variable `PREFIX'.
66 ;; If you don't like default directory tree, please set it.
67 (defvar LISPDIR (install-detect-elisp-directory PREFIX))
68 ;; (setq install-default-elisp-directory "~/lib/emacs/lisp")
69
70 (defvar VERSION_SPECIFIC_LISPDIR
71   (install-detect-elisp-directory PREFIX nil 'version-specific))
72
73 ;; (setq FLIM_DIR (expand-file-name FLIM_PREFIX VERSION_SPECIFIC_LISPDIR))
74 (setq FLIM_DIR (expand-file-name FLIM_PREFIX LISPDIR))
75
76 (setq FLIM_VERSION_SPECIFIC_DIR
77       (expand-file-name FLIM_PREFIX VERSION_SPECIFIC_LISPDIR))
78
79 (defvar PACKAGEDIR
80   (if (boundp 'early-packages)
81       (let ((dirs (append (if early-package-load-path
82                               early-packages)
83                           (if late-package-load-path
84                               late-packages)
85                           (if last-package-load-path
86                               last-packages)))
87             dir)
88         (while (not (file-exists-p
89                      (setq dir (car dirs))))
90           (setq dirs (cdr dirs)))
91         dir)))
92
93 ;;; FLIM-CFG ends here