| 1 |
;;; NICOLA-DDSKK-CFG --- installation setting -*-emacs-lisp-*- |
| 2 |
|
| 3 |
;;; Code: |
| 4 |
|
| 5 |
(or (fboundp 'add-to-list) |
| 6 |
(defun add-to-list (list-var element) |
| 7 |
(or (member element (symbol-value list-var)) |
| 8 |
(set list-var (cons element (symbol-value list-var)))))) |
| 9 |
|
| 10 |
(defvar emacs-major-version |
| 11 |
(progn (string-match "^[0-9]+" emacs-version) |
| 12 |
(string-to-int (substring emacs-version |
| 13 |
(match-beginning 0) (match-end 0))))) |
| 14 |
|
| 15 |
(or (fboundp 'member) |
| 16 |
(defun member (elt list) |
| 17 |
(while (and list (not (equal elt (car list)))) |
| 18 |
(setq list (cdr list))) |
| 19 |
list)) |
| 20 |
|
| 21 |
;; |
| 22 |
|
| 23 |
(defvar default-load-path load-path) |
| 24 |
|
| 25 |
(add-to-list 'load-path |
| 26 |
(expand-file-name "../../site-lisp/skk" data-directory)) |
| 27 |
|
| 28 |
(add-to-list 'load-path |
| 29 |
(expand-file-name "../site-lisp/skk" data-directory)) |
| 30 |
|
| 31 |
(add-to-list 'load-path (expand-file-name ".")) |
| 32 |
|
| 33 |
(if (boundp 'LISPDIR) |
| 34 |
(progn |
| 35 |
(add-to-list 'default-load-path LISPDIR) |
| 36 |
(add-to-list 'load-path LISPDIR) |
| 37 |
(add-to-list 'load-path (expand-file-name "skk" LISPDIR)))) |
| 38 |
|
| 39 |
(if (boundp 'VERSION_SPECIFIC_LISPDIR) |
| 40 |
(add-to-list 'load-path VERSION_SPECIFIC_LISPDIR)) |
| 41 |
|
| 42 |
(require 'install |
| 43 |
(expand-file-name |
| 44 |
(convert-standard-filename "maint/install.el") |
| 45 |
(file-name-directory (directory-file-name default-directory)))) |
| 46 |
|
| 47 |
(defvar emacs-self-contained nil) |
| 48 |
|
| 49 |
;; Default value of install-prefix is not valid on some systems, especially |
| 50 |
;; on non-UNIX like systems. |
| 51 |
(setq install-prefix |
| 52 |
(cond ((eq system-type 'windows-nt) |
| 53 |
;; Meadow, NTEmacs |
| 54 |
(setq emacs-self-contained t) |
| 55 |
(if (string-match "libexec" exec-directory) |
| 56 |
(expand-file-name "share/emacs" |
| 57 |
(expand-file-name "../../../../" exec-directory)) |
| 58 |
(expand-file-name ".." exec-directory)) ) |
| 59 |
|
| 60 |
((eq system-type 'darwin) |
| 61 |
;; Carbon Emacs or Cocoa Emacs (or system-default Emacs) |
| 62 |
(let ((dir (expand-file-name ".." data-directory))) |
| 63 |
(if (string-match "/Emacs\\.app/Contents/Resources/?$" dir) |
| 64 |
(progn |
| 65 |
(setq emacs-self-contained t) |
| 66 |
dir) |
| 67 |
(expand-file-name "../../.." dir)))) |
| 68 |
|
| 69 |
(t |
| 70 |
(expand-file-name "../../../.." data-directory)))) |
| 71 |
|
| 72 |
;;; @ Please specify prefix of install directory. |
| 73 |
;;; |
| 74 |
|
| 75 |
;; Please specify install path prefix. |
| 76 |
;; If it is omitted, shared directory (maybe /usr/local is used). |
| 77 |
(defvar PREFIX install-prefix) |
| 78 |
;;(setq PREFIX "~/") |
| 79 |
|
| 80 |
;; Please specify prefix for ``NICOLA-DDSKK'' [optional] |
| 81 |
(setq NICOLA-DDSKK_PREFIX "nicola-ddskk") |
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
;;; @ optional settings |
| 86 |
;;; |
| 87 |
|
| 88 |
;; It is generated by automatically. Please set variable `PREFIX'. |
| 89 |
;; If you don't like default directory tree, please set it. |
| 90 |
(defvar LISPDIR |
| 91 |
(cond (emacs-self-contained |
| 92 |
(expand-file-name "site-lisp" PREFIX)) |
| 93 |
(t |
| 94 |
(install-detect-elisp-directory PREFIX)))) |
| 95 |
;; (setq install-default-elisp-directory "~/lib/emacs/lisp") |
| 96 |
|
| 97 |
(defvar VERSION_SPECIFIC_LISPDIR |
| 98 |
(cond (emacs-self-contained |
| 99 |
(expand-file-name "site-lisp" PREFIX)) |
| 100 |
(t |
| 101 |
(install-detect-elisp-directory PREFIX nil 'version-specific)))) |
| 102 |
|
| 103 |
|
| 104 |
;; (setq FLIM_DIR (expand-file-name FLIM_PREFIX VERSION_SPECIFIC_LISPDIR)) |
| 105 |
(setq NICOLA-DDSKK_DIR (expand-file-name NICOLA-DDSKK_PREFIX |
| 106 |
VERSION_SPECIFIC_LISPDIR)) |
| 107 |
|
| 108 |
;;; NICOLA-DDSKK-CFG ends here |