This repository has been archived by the owner on Apr 8, 2023. It is now read-only.
forked from technomancy/emacs-starter-kit
-
Notifications
You must be signed in to change notification settings - Fork 69
/
Copy pathinit.el
89 lines (74 loc) · 3.29 KB
/
init.el
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
85
86
87
88
89
;;; init.el --- Where all the magic begins
;;
;; Part of the Emacs Starter Kit
;;
;; This is the first thing to get loaded.
;;
(setq dotfiles-dir (file-name-directory (or (buffer-file-name) load-file-name)))
(setq dotfiles-dir (file-name-directory (or load-file-name (buffer-file-name))))
(setq autoload-file (concat dotfiles-dir "loaddefs.el"))
(setq package-user-dir (concat dotfiles-dir "elpa"))
(setq custom-file (concat dotfiles-dir "custom.el"))
(add-to-list 'load-path (expand-file-name
"lisp" (expand-file-name
"org" (expand-file-name
"src" dotfiles-dir))))
;; Common Lisp compatability
;;(require 'cl-lib)
;; Package Locations
(if (fboundp 'normal-top-level-add-subdirs-to-load-path)
(let* ((my-lisp-dir "~/.emacs.d/")
(default-directory my-lisp-dir))
;; (setq load-path (cons my-lisp-dir load-path))
(normal-top-level-add-subdirs-to-load-path)))
(server-start); start emacs in server mode
;; Font-face setup. Check the availability of a some default fonts, in
;; order of preference. The first of these alternatives to be found is
;; set as the default font, together with base size and fg/bg
;; colors. If none of the preferred fonts is found, nothing happens
;; and Emacs carries on with the default setup. We do this here to
;; prevent some of the irritating flickering and resizing that
;; otherwise goes on during startup. You can reorder or replace the
;; options here with the names of your preferred choices.
(defun font-existsp (font)
"Check to see if the named FONT is available."
(if (null (x-list-fonts font))
nil t))
;; Set default font. First one found is selected.
(cond
((eq window-system nil) nil)
((font-existsp "IMB Plex Mono")
(set-face-attribute 'default nil :height 141 :font "IBM Plex Mono Text"))
((font-existsp "Input Mono Compressed")
(set-face-attribute 'default nil :height 141 :font "Input Mono Compressed"))
((font-existsp "PragmataPro")
(set-face-attribute 'default nil :height 141 :font "PragmataPro"))
((font-existsp "Source Code Pro")
(set-face-attribute 'default nil :height 141 :font "Source Code Pro"))
((font-existsp "Menlo")
(set-face-attribute 'default nil :height 141 :font "Menlo"))
((font-existsp "Consolas")
(set-face-attribute 'default nil :height 141 :font "Consolas"))
((font-existsp "Inconsolata")
(set-face-attribute 'default nil :height 141 :font "Inconsolata"))
((font-existsp "Envy Code R")
(set-face-attribute 'default nil :height 141 :font "Envy Code R"))
)
;; Line-spacing tweak
;; Set this to a different number depending on taste and the fonr
;; selected. The value can be a integer or decimal number.
;; if integer: it means pixels, added below each line.
;; if float (e.g 0.02): a scaling factor relative to current window's default line height.
;; if nil: add no extra spacing.
(setq-default line-spacing 0.06) ;; tuned for Pragmata Pro
;; Load up Org Mode and Babel
;; load up the main file
;; org-mode windmove compatibility
(setq org-replace-disputed-keys t)
(require 'org)
(org-babel-load-file (expand-file-name "starter-kit.org" dotfiles-dir))
;;; Higher garbage collection threshold
(setq gc-cons-threshold 20000000)
;;; init.el ends here
(put 'upcase-region 'disabled nil)
(put 'downcase-region 'disabled nil)