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 "\ |
---|
17 | Major version number of this version of vine-default. |
---|
18 | This variable equals the major version number of Vine Linux that is running.") |
---|
19 | |
---|
20 | (defconst vine-default-minor-version 0 "\ |
---|
21 | Minor version number of this version of vine-default. |
---|
22 | This 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)) "\ |
---|
25 | The 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 | (run-hooks 'vine-default-setup-hook) |
---|
56 | ;; (run-hooks 'after-vine-default-setup-hook); obsolete |
---|
57 | ) |
---|
58 | ) |
---|
59 | |
---|
60 | (defun show-vine-default () |
---|
61 | "A function to show current vine-default configurations" |
---|
62 | (interactive) |
---|
63 | (shell-command |
---|
64 | "/usr/lib/emacsen-common/show-vine-default.sh EMACS_VERSION")) |
---|
65 | |
---|
66 | (defun drop-vine-default-from-load-path (regex) |
---|
67 | "A function to drop a path matching to REGEX from load-path" |
---|
68 | (setq load-path |
---|
69 | (let (list) |
---|
70 | (dolist (x (reverse load-path) list) |
---|
71 | (unless (string-match regex x) |
---|
72 | (setq list (cons x list)))) |
---|
73 | ) |
---|
74 | ) |
---|
75 | ) |
---|
76 | |
---|
77 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
78 | |
---|
79 | ;;; run functions from the /etc/emacs-EMACS_VERSION/site-start.d directory |
---|
80 | ;;; Files in this directory ending with ".el" are run on startup |
---|
81 | (mapc 'load (directory-files "/etc/emacs-EMACS_VERSION/site-start.d" t "\\.el\\'")) |
---|
82 | |
---|
83 | ;;; load local configuration |
---|
84 | (if (file-exists-p (expand-file-name "/etc/emacs/emacs25-local.el")) |
---|
85 | (load (expand-file-name "/etc/emacs/emacs25-local.el"))) |
---|
86 | |
---|
87 | ;;; load vine-default configuration per user before vine-default-setup |
---|
88 | (if (file-exists-p (expand-file-name "~/.emacs.d/emacs25-vine-default.el")) |
---|
89 | (load (expand-file-name "~/.emacs.d/emacs25-vine-default.el"))) |
---|
90 | |
---|
91 | ;;; run vine-default-setup |
---|
92 | (vine-default-setup) |
---|
93 | |
---|
94 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
95 | |
---|
96 | ;; Local Variables: |
---|
97 | ;; mode: emacs-lisp |
---|
98 | ;; End: |
---|