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

Revision 3288, 2.7 KB checked in by munepi, 13 years ago (diff)

updated emacs23-vl.spec, emacs24-vl.spec

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