release.
[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
16 (if (boundp 'data-directory)
17     nil
18   ;; Emacs 19 emulating variable.
19   (defvar data-directory exec-directory)
20   )
21
22 (add-to-list 'load-path
23              (expand-file-name "../../site-lisp/apel" data-directory))
24
25 (if (boundp 'LISPDIR)
26     (progn
27       (add-to-list 'default-load-path LISPDIR)
28       (add-to-list 'load-path LISPDIR)
29       (add-to-list 'load-path (expand-file-name "apel" LISPDIR))
30       ))
31
32 (if (boundp 'VERSION_SPECIFIC_LISPDIR)
33     (add-to-list 'load-path VERSION_SPECIFIC_LISPDIR))
34
35 (if (fboundp 'member)
36     nil
37   ;; It is needed because the function `add-path' uses it.
38   (require 'poe))
39
40 (require 'install)
41
42 (add-latest-path "custom")
43
44 (add-path default-directory)
45
46 ;; (or (fboundp 'write-region-as-binary)
47 ;;     (error "Please install latest APEL 7.3 or later."))
48 ;; (or (fboundp 'insert-file-contents-as-binary)
49 ;;     (error "Please install latest APEL 7.3 or later."))
50
51
52 ;;; @ Please specify prefix of install directory.
53 ;;;
54
55 ;; Please specify install path prefix.
56 ;; If it is omitted, shared directory (maybe /usr/local is used).
57 (defvar PREFIX install-prefix)
58 ;;(setq PREFIX "~/")
59
60 ;; Please specify prefix for ``FLIM'' [optional]
61 (setq FLIM_PREFIX "flim")
62
63 \f
64
65 ;;; @ optional settings
66 ;;;
67
68 ;; It is generated by automatically. Please set variable `PREFIX'.
69 ;; If you don't like default directory tree, please set it.
70 (defvar LISPDIR (install-detect-elisp-directory PREFIX))
71 ;; (setq install-default-elisp-directory "~/lib/emacs/lisp")
72
73 (defvar VERSION_SPECIFIC_LISPDIR
74   (install-detect-elisp-directory PREFIX nil 'version-specific))
75
76 ;; (setq FLIM_DIR (expand-file-name FLIM_PREFIX VERSION_SPECIFIC_LISPDIR))
77 (setq FLIM_DIR (expand-file-name FLIM_PREFIX 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