-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.el
More file actions
84 lines (64 loc) · 2.57 KB
/
Copy pathinit.el
File metadata and controls
84 lines (64 loc) · 2.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
;; -*- mode: Emacs-Lisp -*-
;; Timer
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
;; (package-initialize)
(defvar *emacs-load-start* (current-time))
;; Meta key setup
(cond ((eq system-type 'darwin)
(setq mac-command-modifier 'meta) ; make cmd key do Meta
(setq mac-option-modifier 'super) ; make opt key do Super
;; (setq mac-control-modifier 'control) ; make Control key do Control
(setq ns-function-modifier 'hyper) ; make Fn key do Hyper
)
((eq system-type 'windows)
(setq w32-pass-lwindow-to-system nil)
(setq w32-lwindow-modifier 'super) ; Left Windows key
(setq w32-pass-rwindow-to-system nil)
(setq w32-rwindow-modifier 'super) ; Right Windows key
(setq w32-pass-apps-to-system nil)
(setq w32-apps-modifier 'hyper) ; Menu/App key
))
;; (when (eq system-type 'darwin)
;; (setq ns-command-modifier 'meta)
;; (setq ns-alternate-modifier 'none))
(setq custom-file "~/.emacs.d/custom-init.el")
(setq current-path (getenv "PWD"))
(cd "~/.emacs.d/custom") ;; all sub dir will be added to the load-path
(normal-top-level-add-subdirs-to-load-path)
(dolist (path `(,(expand-file-name "~/.emacs.d/custom")
,(expand-file-name "~/.emacs.d/vendor")
,(expand-file-name "~/.emacs.d/vendor/org-ref")
"PACKAGE_DIRECTORY"))
(add-to-list 'load-path path))
(when (>= emacs-major-version 24) (load "packages-settings"))
;; (message "Emacs ELPA loaded in %ds"
;; (destructuring-bind (hi lo ms &optional ps) (current-time)
;; (- (+ hi lo)
;; (+ (first *emacs-load-start*) (second *emacs-load-start*)))))
;; (load "env") ;; takes 1s to loade
(use-package exec-path-from-shell
:if (memq window-system '(mac ns))
:ensure t
:custom
(exec-path-from-shell-variables '("PATH" "MANPATH" "JAVA_HOME" "CLASSPATH" "PYTHONPATH" "SCIPY_PIL_IMAGE_VIEWER"))
:config
(exec-path-from-shell-initialize))
(load "keys")
(if (eq current-path nil)
(cd "~/.")
(cd current-path))
(load "faces")
(load "custom-vars-and-face")
(load "functions")
(load "general") ;; takes 2s to load
(load "lang") ;; takes 1s to load
(message "Emacs config loaded in %ds"
(destructuring-bind (hi lo ms &optional ps) (current-time)
(- (+ hi lo)
(+ (first *emacs-load-start*) (second *emacs-load-start*)))))
;;
;; END init.el
;;