source: projects/specs/trunk/e/emacs24/site-start.el.emacs24 @ 3303

Revision 3303, 3.4 KB checked in by munepi, 13 years ago (diff)

updated emacs24-vl.spec, site-start.el.emacs24: defined constants of recording the version of the vine-default system; modified emacs-build-system and report-emacs-bug-address for Vine Linux; completely dropped the definition of after-vine-default-setup-hook

Line 
1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2;;; GNU Emacs EMACS_VERSION default settings for Vine Linux
3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
4
5(setq emacs-build-system
6      (concat emacs-build-system ", modified for Vine Linux"))
7
8(setq report-emacs-bug-address "Vine@vinelinux.org")
9
10(defcustom emacs-ime (getenv "EMACS_IME")
11  "A variable of default Input Method Editor"
12  :type 'string)
13(if (null emacs-ime)
14    (setq emacs-ime "ibus-el"))
15
16(defconst vine-default-major-version VINE_DEFAULT_MAJOR_VERSION "\
17Major version number of this version of vine-default.
18This variable equals the major version number of Vine Linux that is running.")
19
20(defconst vine-default-minor-version 0 "\
21Minor version number of this version of vine-default.
22This variable is the system number for vine-default-major-version.")
23
24(defconst vine-default-version (+ vine-default-major-version (/ (float vine-default-minor-version) 10)) "\
25The version of vine-default.")
26
27(defcustom vine-default t
28  "A boolean for all Vine Linux default settings"
29  :type 'boolean)
30(if (equal (getenv "LOGNAME") "root")
31    (setq vine-default nil))
32
33(defcustom vine-default-base t
34  "A boolean for vine-default-base"
35  :type 'boolean)
36
37(defcustom vine-default-faces t
38  "A boolean for vine-default-faces"
39  :type 'boolean)
40
41(defvar vine-default-setup-hook nil
42  "List of functions to be called at vine-default-setup")
43
44;; (defvar after-vine-default-setup-hook nil
45;;   "This hook is obsolete! Please do not use this hook.
46;;    List of functions to be called at the end of vine-default-setup")
47
48(defun vine-default-setup ()
49  "A function for setup to default configurations of Vine Linux"
50  (when vine-default
51    (message "Starting vine-default-setup ...")
52    (when vine-default-base
53      (message "Loading vine-default-base ...")
54      (require 'vine-default-base))
55    (when vine-default-faces
56      (message "Loading vine-default-faces ...")
57      (require 'vine-default-faces))
58    (run-hooks 'vine-default-setup-hook)
59    ;; (run-hooks 'after-vine-default-setup-hook); obsolete
60    )
61  )
62
63(defun show-vine-default ()
64  "A function to show current vine-default configurations"
65  (interactive)
66  (shell-command
67   "/usr/lib/emacsen-common/show-vine-default.sh EMACS_VERSION"))
68
69(defun drop-vine-default-from-load-path (regex)
70  "A function to drop a path matching to REGEX from load-path"
71  (setq load-path
72        (let (list)
73          (dolist (x (reverse load-path) list)
74            (unless (string-match regex x)
75              (setq list (cons x list))))
76          )
77        )
78  )
79
80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
81
82;;; run functions from the /etc/emacs-EMACS_VERSION/site-start.d directory
83;;; Files in this directory ending with ".el" are run on startup
84(mapc 'load (directory-files "/etc/emacs-EMACS_VERSION/site-start.d" t "\\.el\\'"))
85
86;;; load local configuration
87(if (file-exists-p (expand-file-name "/etc/emacs/emacs24-local.el"))
88    (load (expand-file-name "/etc/emacs/emacs24-local.el")))
89
90;;; load vine-default configuration per user before vine-default-setup
91(if (file-exists-p (expand-file-name "~/.emacs.d/emacs24-vine-default.el"))
92    (load (expand-file-name "~/.emacs.d/emacs24-vine-default.el")))
93
94;;; run vine-default-setup
95(vine-default-setup)
96
97;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
98
99;; Local Variables:
100;; mode: emacs-lisp
101;; End:
Note: See TracBrowser for help on using the repository browser.